Custom Compound Components

How can I create a custom component that is made up of other components? For example, I want to create a custom component that is a Window. Within the window, I want to have groups of ComboBoxes in a horizontal row.

Something like this:

  • ComboBoxRow - Custom Component, extends View, contains 4 ComboBoxes in a horizontal layout
  • ComboBoxGroup - Custom Component, extends View, a vertical layout of CombBoxRows
  • Container - Custom Component, extends Window, a vertical layout of ComboBoxGroups

I also want to have custom functions for the Container, like so:

  • addCombBoxGroup()
  • addComboBoxRow(groupId)
  • removeCombBoxRow(rowId)
  • removeComboBoxGroup(groupId)

Thanks.

To start you can just place layout in window and combo in layout

http://webix.com/snippet/0066872f

If you really wnt to create a custom control you can extend layout like next

http://webix.com/snippet/f1742c60

The 2nd snippet is a good start. I will take that example to work from there. Thanks.