merge_trait_groups
A trait_element is:
- A string (specifying a trait name)
- A tuple containing 1 to 3 elements:
- 1 string: trait name
- 2 strings: trait name and UI label
- 1 string and 1 TraitEditor: trait name and editor
- 2 strings and 1 TraitEditor: trait name, UI label and editor
A Trait Sheet description can be:
- A string (edit the single trait whose name is specified by the string)
- A list of trait_elements: (simple non-tabbed trait sheet, vertically
oriented, two-column using UI labels and simple editor)
- A TraitGroup (simple non-tabbed trait sheet using layout specified by
the TraitGroup contents)
- A list of TraitGroup's (Each TraitGroup defines a notebook tab, the
contents of which are defined by the TraitGroup's contents)
Each element passed to a TraitGroup constructor can be:
- A trait_element (defines a single trait to be editor)
- A TraitGroup (defines a nested group of traits to be edited)
Examples of Trait Sheet descriptions:
[ 'foo', 'bar', 'baz' ]
[ TraitGroup( 'foo', 'bar', 'baz', label = 'Main' ),
TraitGroup( 'color', 'style', 'weight', label = 'Border' )
]
[ TraitGroup( ( 'foo', 'Enter Foo' ),
( 'bar', 'Enter Bar', TraitEditBar() ),
'baz', label = 'Main' ),
TraitGroup( 'color', 'style', 'weight', label = 'Border' )
]
[ TraitGroup(
TraitGroup( 'foo', 'bar', 'baz',
label = 'Group 1' ),
TraitGroup( 'color', 'style', 'weight',
label = 'Line',
border = 'no',
orientation = 'horizontal',
show_labels = 'no',
style = 'custom' ),
label = 'Main' ),
- Value:
-
|