enaml.widgets.abstract_button

Classes

AbstractButton

A base class for creating button-like controls.

class enaml.widgets.abstract_button.AbstractButton(parent=None, **kwargs)[source]

Bases: enaml.widgets.control.Control

A base class for creating button-like controls.

text

The text to use as the button’s label.

icon

The source url for the icon to use for the button.

icon_size

The size to use for the icon. The default is an invalid size and indicates that an appropriate default should be used.

group

Group to which this button belongs to.

checkable

Whether or not the button is checkable. The default is False.

checked

Whether a checkable button is currently checked.

clicked

Fired when the button is pressed then released. The payload will be the current checked state. This event is triggered by the proxy object when the button is clicked.

toggled

Fired when a checkable button is toggled. The payload will be the current checked state. This event is triggered by the proxy object when a togglable button is toggled.

hug_width

Buttons hug their contents’ width weakly by default.

proxy

A reference to the ProxyAbstractButton object.

__init__(parent=None, **kwargs)[source]

Initialize an Object.

Parameters
  • parent (Object or None, optional) – The Object instance which is the parent of this object, or None if the object has no parent. Defaults to None.

  • **kwargs – Additional keyword arguments to apply as attributes to the object.