enaml.widgets.widget

Classes

Widget The base class of visible widgets in Enaml.
class enaml.widgets.widget.Widget(parent=None, **kwargs)[source]

Bases: enaml.widgets.toolkit_object.ToolkitObject, enaml.styling.Stylable

The base class of visible widgets in Enaml.

enabled

Whether or not the widget is enabled.

visible

Whether or not the widget is visible.

background

The background color of the widget.

foreground

The foreground color of the widget.

font

The font used for the widget.

minimum_size

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

maximum_size

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

tool_tip

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

status_tip

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

show_focus_rect

A flag indicating whether or not to show the focus rectangle for the given widget. This is not necessarily support by all widgets on all clients. A value of None indicates to use the default as supplied by the client.

proxy

A reference to the ProxyWidget object.

restyle()[source]

Restyle the toolkit widget.

This method is invoked by the Stylable class when the style dependencies have changed for the widget. This will trigger a proxy restyle if necessary. This method should not typically be called directly by user code.

show()[source]

Ensure the widget is shown.

Calling this method will also set the widget visibility to True.

hide()[source]

Ensure the widget is hidden.

Calling this method will also set the widget visibility to False.