traitsui.editor_factory module

Defines the abstract EditorFactory class, which represents a factory for creating the Editor objects used in a Traits-based user interface.

class traitsui.editor_factory.EditorFactory(*args, **traits)

Bases: traits.has_traits.HasPrivateTraits

Represents a factory for creating the Editor objects in a Traits-based user interface.

custom_editor(ui, object, name, description, parent)

Generates an editor using the “custom” style.

init()

Performs any initialization needed after all constructor traits have been set.

named_value(name, ui)

Returns the value of a specified extended name of the form: name or context_object_name.name[.name…]:

readonly_editor(ui, object, name, description, parent)

Generates an “editor” that is read-only.

simple_editor(ui, object, name, description, parent)

Generates an editor using the “simple” style.

string_value(value, format_func=None)

Returns the text representation of a specified object trait value.

If the format_func attribute is set on the editor factory, then this method calls that function to do the formatting. If the format_str attribute is set on the editor factory, then this method uses that string for formatting. If neither attribute is set, then this method just calls the appropriate text type to format.

text_editor(ui, object, name, description, parent)

Generates an editor using the “text” style.

class traitsui.editor_factory.EditorWithListFactory(*args, **traits)

Bases: traitsui.editor_factory.EditorFactory

Base class for factories of editors for objects that contain lists.

Previous topic

traitsui.editor module

Next topic

traitsui.editors_gen module

This Page