enaml.widgets.object_combo

Classes

ObjectCombo

A drop-down list from which one item can be selected at a time.

class enaml.widgets.object_combo.ObjectCombo(parent=None, **kwargs)[source]

Bases: enaml.widgets.control.Control

A drop-down list from which one item can be selected at a time.

Use a combo box to select a single item from a collection of items.

items

The list of items to display in the combo box.

selected

The selected item from the list of items. The default will be the first item in the list of items, or None.

to_string

The callable to use to convert the items into strings for display. The default is the builtin ‘str’.

to_icon

The callable to use to convert the items into icons for display. The default is a lambda which returns None.

editable

Whether the text in the combo box can be edited by the user.

hug_width

A combo box hugs its width weakly by default.

proxy

A reference to the ProxyObjectCombo object.