Appendix II: Editor Factories for Predefined TraitsΒΆ

Predefined traits that are not listed in this table use TextEditor() by default, and have no other appropriate editor factories.

Trait

Default Editor Factory

Other Possible Editor Factories

Any

TextEditor

EnumEditor, ImageEnumEditor, ValueEditor

Array

ArrayEditor (for 2-D arrays)

Bool

BooleanEditor

ThemedCheckboxEditor

Button

ButtonEditor

CArray

ArrayEditor (for 2-D arrays)

CBool

BooleanEditor

CComplex

TextEditor

CFloat, CInt, CLong

TextEditor

LEDEditor

Code

CodeEditor

Color

ColorEditor

Complex

TextEditor

CStr, CUnicode

TextEditor (multi_line=True)

CodeEditor, HTMLEditor

Dict

TextEditor

ValueEditor

Directory

DirectoryEditor

Enum

EnumEditor

ImageEnumEditor

Event

(none)

ButtonEditor, ToolbarButtonEditor

File

FileEditor

AnimatedGIFEditor

Float

TextEditor

LEDEditor

Font

FontEditor

HTML

HTMLEditor

Instance

InstanceEditor

TreeEditor, DropEditor, DNDEditor, ValueEditor

List

TableEditor for lists of HasTraits objects; ListEditor for all other lists.

CSVListEditor, CheckListEditor, SetEditor, ValueEditor, ThemedVerticalNotebookEditor

Long

TextEditor

LEDEditor

Password

TextEditor(password=True)

PythonValue

ShellEditor

Range

RangeEditor

ThemedSliderEditor

Regex

TextEditor

CodeEditor

RGBColor

RGBColorEditor

Str

TextEditor(multi_line=True)

CodeEditor, HTMLEditor

String

TextEditor

CodeEditor, ThemedTextEditor

This

InstanceEditor

ToolbarButton

ButtonEditor

Tuple

TupleEditor

UIDebugger

ButtonEditor (button calls the UIDebugEditor factory)

Unicode

TextEditor(multi_line=True)

HTMLEditor

WeakRef

InstanceEditor