enaml.widgets.tool_bar

Classes

ToolBar

A widget which displays a row of tool buttons.

class enaml.widgets.tool_bar.ToolBar(parent=None, **kwargs)[source]

Bases: enaml.widgets.constraints_widget.ConstraintsWidget

A widget which displays a row of tool buttons.

A ToolBar is typically used as a child of a MainWindow where it can be dragged and docked in various locations in the same fashion as a DockPane. However, a ToolBar can also be used as the child of a Container and layed out with constraints, though in this case it will lose its ability to be docked.

button_style

The button style to apply to actions added to the tool bar.

movable

Whether or not the tool bar is movable by the user. This value only has meaning if the tool bar is the child of a MainWindow.

floatable

Whether or not the tool bar can be floated as a separate window. This value only has meaning if the tool bar is the child of a MainWindow.

floating

A boolean indicating whether or not the tool bar is floating. This value only has meaning if the tool bar is the child of a MainWindow.

dock_area

The dock area in the MainWindow where the tool bar is docked. This value only has meaning if the tool bar is the child of a MainWindow.

allowed_dock_areas

The areas in the MainWindow where the tool bar can be docked by the user. This value only has meaning if the tool bar is the child of a MainWindow.

orientation

The orientation of the toolbar. This only has meaning when the toolbar is not a child of a MainWindow and is used as part of a constraints based layout.

auto_hug

Whether or not to automatically adjust the ‘hug_width’ and ‘hug_height’ values based on the value of ‘orientation’.

proxy

A reference to the ProxyToolBar object.

items()[source]

Get the items defined on the tool bar.