enaml.widgets.multiline_field

Classes

MultilineField

A simple multiline editable text widget.

class enaml.widgets.multiline_field.MultilineField(parent=None, **kwargs)[source]

Bases: Control

A simple multiline editable text widget.

text

The unicode text to display in the field.

read_only

Whether or not the field is read only.

auto_sync_text

Whether the text in the control should be auto-synchronized with the text attribute on the field. If this is True, the text will be updated every time the user edits the control. In order to be efficient, the toolkit will batch updates on a collapsing timer.

hug_width

Multiline fields expand freely in width and height by default.

hug_height

How strongly a widget hugs it’s height hint. This is equivalent to the constraint:

(height == hint) | hug_height
proxy

A reference to the ProxyMultilineField object.

sync_text()[source]

Synchronize the text with the text in the control.

field_text()[source]

Get the text stored in the field control.

Depending on the state of the field, this text may be different than that stored in the ‘text’ attribute.

Returns

result – The unicode text stored in the field.

Return type

unicode

activated

An event fired when an object’s proxy is activated. It is triggered once during the object lifetime, at the end of the activate_proxy method.

background

The background color of the widget.

destroyed

An event fired when an object has been destroyed. It is triggered once during the object lifetime, just before the object is removed from the tree structure.

enabled

Whether or not the widget is enabled.

initialized

An event fired when an object is initialized. It is triggered once during the object lifetime, at the end of the initialize method.

name

Export the ‘name’ attribute as a declarative member.

style_class

The style class to which this item belongs. Multiple classes can be separated with whitespace. An empty string indicates the widget does not belong to any style class.