enaml.widgets.form

Classes

Form

A Container subclass that arranges its children in two columns.

class enaml.widgets.form.Form(parent=None, **kwargs)[source]

Bases: Container

A Container subclass that arranges its children in two columns.

The left column is typically Labels, but this is not a requirement. The right are the actual widgets for data entry. The children should be in alternating label/widget order. If there are an odd number of children, the last child will span both columns.

The Form provides an extra constraint variable, ‘midline’, which is used as the alignment anchor for the columns.

midline

The ConstraintVariable giving the midline along which the labels and widgets are aligned.

row_spacing

The spacing to place between the form rows, in pixels.

column_spacing

The spacing to place between the form columns, in pixels.

layout_constraints()[source]

Get the layout constraints for a Form.

A Form supplies default constraints which will arrange the children in a two column layout. User defined ‘constraints’ will be added on top of the generated form constraints.

This method cannot be overridden from Enaml syntax.

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.

features

Set the extra features to enable for this widget. This value must be provided when the widget is instantiated. Runtime changes to this value are ignored.

font

The font used for the widget.

foreground

The foreground color of the widget.

initialized

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

maximum_size

The maximum size for the widget. The default means that the client should determine an intelligent maximum size.

minimum_size

The minimum size for the widget. The default means that the client should determine an intelligent minimum size.

name

Export the ‘name’ attribute as a declarative member.

status_tip

The status tip to show when the user hovers over the widget.

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.

tool_tip

The tool tip to show when the user hovers over the widget.