Inherits from
- ViewSubElement: enthought.traits.ui.view_element.ViewSubElement
Attributes
- columns
The number of columns in the group
columns = Range(1, 10)
- content
A list of Group, Item, and Include objects in this group.
content = List(ViewSubElement)
- defined_when
Pre-condition for including the groupin the display. If the expression evaluates to False, the group is not defined in the display. Conditions for defined_when are evaluated only once, when the display is first constructed. Use this attribute for conditions based on attributes that vary from object to object, but that do not change over time.
defined_when = Str
- dock
Default docking style of items in group.
dock = container_delegate
- enabled_when
Pre-condition for enabling the group. If the expression evaluates to False, the group is disabled, that is, none of the widgets accept input. All enabled_when conditions are checked each time that any trait value is edited in the display. Therefore, you can use enabled_when conditions to enable or disable groups in response to user input.
enabled_when = Str
- export
Category of elements dragged from view.
export = container_delegate
- help
Optional help text (for top-level group). This help text appears in the View-level help window (created by the default help handler), for any View that contains only this group. Group-level help is ignored for nested groups and multiple top-level groups
help = Str
- id
A unique identifier for the group.
id = Str
- image
Default image to display on notebook tabs.
image = container_delegate
- label
User interface label for the group. How the label is displayed depends on the show_border attribute, and on the layout attribute of the group's parent group or view.
label = Str
- layout
Layout style of the group, which can be one of the following:
- 'normal' (default): Sub-groups are displayed sequentially in a single panel.
- 'flow': Sub-groups are displayed sequentially, and then "wrap" when they exceed the available space in the orientation direction.
- 'split': Sub-groups are displayed in a single panel, separated by "splitter bars", which the user can drag to adjust the amount of space for each sub-group.
- 'tabbed': Each sub-group appears on a separate tab, labeled with the sub-group's label text, if any.
This attribute is ignored for groups that contain only items, or contain only one sub-group.
layout = Layout
- object
Default context object for group items.
object = container_delegate
- orientation
Spatial orientation of the group's elements. Can be 'vertical' (default) or 'horizontal'.
orientation = Orientation
- padding
Amount of padding (in pixels) to add around each item in the group. The value must be an integer between 0 and 15. (Unlike the Item class, the Group class does not support negative padding.) The padding for any individual widget is the sum of the padding for its Group, the padding for its Item, and the default spacing determined by the toolkit.
padding = Padding
- selected
Is this group the tab that is initially selected? If True, the group's tab is displayed when the view is opened. If the layout of the group's parent is not 'tabbed', this attribute is ignored.
selected = false
- show_border
Should a border be drawn around group? If set to True, the label text is embedded in the border. If set to False, the label appears as a banner above the elements of the group.
show_border = false
- show_labels
Should labels be added to items in group? Only items that are directly contained in the group are affected. That is, if the group contains a sub-group, the display of labels in the sub-group is not affected by the attribute on this group.
show_labels = true
- show_left
Should labels be shown to the left of items (True) or the right (False)? Only items that are directly contained in the group are affected. That is, if the group contains a sub-group, the display of labels in the sub-group is not affected by the attribute in this group. If show_labels is False, this attribute is irrelevant.
show_left = true
- springy
Should the group use extra space along its parent group's layout orientation?
springy = false
- style
Default editor style of items in the group.
style = container_delegate
- visible_when
Pre-condition for showing the group. If the expression evaluates to False, the group and its items are not visible (and they disappear if they were previously visible). If the value evaluates to True, the group and items become visible. All visible_when conditions are checked each time that any trait value is edited in the display. Therefore, you can use visible_when conditions to hide or show groups in response to user input.
visible_when = Str
Inherited from base classes
Method summary
- __init__(self, *values, **traits)
- __repr__(self)
- get_label(self, ui)
- get_shadow(self, ui)
- is_includable(self)
- replace_include(self, view_elements)
- set_container(self)
Inherited from base classes
- __deepcopy__(self, memo)
- __getstate__(self)
- __prefix_trait__(self, name)
- __reduce_ex__(self, protocol)
- __setstate__(self, state)
- add_class_trait(cls, name, *trait)
- add_trait(self, name, *trait)
- add_trait_category(cls, category)
- add_trait_listener(self, object, prefix = '')
- all_trait_names(self)
- base_trait(self, name)
- class_default_traits_view(cls)
- class_editable_traits(cls)
- class_trait_names(cls, **metadata)
- class_trait_view(cls, name = None, view_element = None)
- class_trait_view_elements(cls)
- class_traits(cls, **metadata)
- clone_traits(self, traits = None, memo = None, copy = None, **metadata)
- configure_traits(self, filename = None, view = None, kind = None, edit = True, context = None, handler = None, id = '', scrollable = None, **args)
- copy_traits(self, other, traits = None, memo = None, copy = None, **metadata)
- copyable_trait_names(self, **metadata)
- default_traits_view(self)
- edit_traits(self, view = None, parent = None, kind = None, context = None, handler = None, id = '', scrollable = None, **args)
- editable_traits(self)
- get(self, *names, **metadata)
- on_trait_change(self, handler, name = None, remove = False, dispatch = 'same')
- print_traits(self, show_help = False, **metadata)
- remove_trait(self, name)
- remove_trait_listener(self, object, prefix = '')
- reset_traits(self, traits = None, **metadata)
- set(self, trait_change_notify = True, **traits)
- set_trait_dispatch_handler(cls, name, klass, override = False)
- sync_trait(self, trait_name, object, alias = None, mutual = True, remove = False)
- trait(self, name, force = False, copy = False)
- trait_context(self)
- trait_monitor(cls, handler, remove = False)
- trait_names(self, **metadata)
- trait_subclasses(cls, all = False)
- trait_view(self, name = None, view_element = None)
- trait_view_elements(self)
- trait_views(self, klass = None)
- traits(self, **metadata)
- validate_trait(self, name, value)
Methods
- __init__(self, *values, **traits)
Initializes the group object.
- __repr__(self)
Returns a "pretty print" version of the Group.
- get_label(self, ui)
Gets the label to use this group.
- get_shadow(self, 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(self)
Returns a Boolean value indicating whether the object is replacable by an Include object.
- replace_include(self, 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(self)
Sets the correct container for the content.