traitsui.view_elements module

Define the ViewElements class, which is used to define a (typically class-based) hierarchical name space of related ViewElement objects.

Normally there is a ViewElements object associated with each Traits-based class, which contains all of the ViewElement objects associated with the class. The ViewElements object is also linked to the ViewElements objects of its associated class’s parent classes.

class traitsui.view_elements.SearchStackItem[source]

Bases: HasStrictTraits

context = Int()

Index into the ‘mro’ list of ViewElements that the ID was found in

id = Str()

Name that was looked up

class traitsui.view_elements.ViewElements[source]

Bases: HasStrictTraits

Defines a hierarchical name space of related ViewElement objects.

content = content_trait

Dictionary containing the named ViewElement items

filter_by(klass=None)[source]

Returns a sorted list of all names accessible from the ViewElements object that are of a specified (ViewElement) type.

find(name, stack=None)[source]

Finds a specified ViewElement within the specified (optional) search context.