enaml.widgets.menu

Classes

Menu

A widget used as a menu in a MenuBar.

class enaml.widgets.menu.Menu(parent=None, **kwargs)[source]

Bases: enaml.widgets.toolkit_object.ToolkitObject

A widget used as a menu in a MenuBar.

title

The title to use for the menu.

enabled

Whether or not the menu is enabled.

visible

Whether or not the menu is visible.

context_menu

Whether this menu should behave as a context menu for its parent.

proxy

A reference to the ProxyMenu object.

items()[source]

Get the items defined on the Menu.

A menu item is one of Action, ActionGroup, or Menu.

popup()[source]

Popup the menu over the current mouse location.

close()[source]

Close the menu.

This API can be used by embedded widgets to close the menu at the appropriate time.