traitsui.group module¶
Defines the Group class used to represent a group of items used in a Traits-based user interface.
-
class
traitsui.group.
Group
(*values, **traits)¶ Bases:
traitsui.view_element.ViewSubElement
Represents a grouping of items in a user interface view.
-
get_label
(ui)¶ Gets the label to use this group.
-
get_shadow
(ui)¶ Returns a ShadowGroup object for the current Group object, which recursively resolves all embedded Include objects and which replaces each embedded Group object with a corresponding ShadowGroup.
-
is_includable
()¶ Returns a Boolean value indicating whether the object is replacable by an Include object.
-
replace_include
(view_elements)¶ Replaces any items that have an id attribute with an Include object with the same ID value, and puts the object with the ID into the specified ViewElements object.
Parameters: view_elements (ViewElements object) – A set of Group, Item, and Include objects
-
set_container
()¶ Sets the correct container for the content.
-
-
class
traitsui.group.
HFlow
(*values, **traits)¶ Bases:
traitsui.group.HGroup
A group in which items are laid out horizontally, and “wrap” when they exceed the available horizontal space..
-
class
traitsui.group.
HGroup
(*values, **traits)¶ Bases:
traitsui.group.Group
A group whose items are laid out horizontally.
-
class
traitsui.group.
HSplit
(*values, **traits)¶ Bases:
traitsui.group.Group
A horizontal group with splitter bars to separate it from other groups.
-
class
traitsui.group.
ShadowGroup
(shadow, **traits)¶ Bases:
traitsui.group.Group
Corresponds to a Group object, but with all embedded Include objects resolved, and with all embedded Group objects replaced by corresponding ShadowGroup objects.
-
get_content
(allow_groups=True)¶ Returns the contents of the Group within a specified context for building a user interface.
This method makes sure that all Group types are of the same type (i.e., Group or Item) and that all Include objects have been replaced by their substituted values.
-
get_id
()¶ Returns an ID for the group.
-
set_container
()¶ Sets the correct container for the content.
-
-
class
traitsui.group.
Tabbed
(*values, **traits)¶ Bases:
traitsui.group.Group
A group that is shown as a tabbed notebook.
-
class
traitsui.group.
VFlow
(*values, **traits)¶ Bases:
traitsui.group.VGroup
A group in which items are laid out vertically, and “wrap” when they exceed the available vertical space.
-
class
traitsui.group.
VFold
(*values, **traits)¶ Bases:
traitsui.group.VGroup
A group in which items are laid out vertically and can be collapsed (i.e. ‘folded’) by clicking their title.
-
class
traitsui.group.
VGrid
(*values, **traits)¶ Bases:
traitsui.group.VGroup
A group whose items are laid out in 2 columns.
-
class
traitsui.group.
VGroup
(*values, **traits)¶ Bases:
traitsui.group.Group
A group whose items are laid out vertically.
-
class
traitsui.group.
VSplit
(*values, **traits)¶ Bases:
traitsui.group.Group
A vertical group with splitter bars to separate it from other groups.