=================== PopupMenu (hwx.gui) =================== A PopupMenu Widget. The PopupMenu is a specialized control that has the abilty of being selected. You can add items and commands to the popup menu. Inherits: - :ref:`Widget (hwx.gui)` -------------- Public Methods -------------- +----------------------------------------------------------------------------------------------------------------+ | clear_ (self) | +----------------------------------------------------------------------------------------------------------------+ | insertItem_ (self, text, menu=None, icon=None, command=None, enabled=True, checked=None, advancedTooltip=None) | +----------------------------------------------------------------------------------------------------------------+ | insertMenu_ (self, text) | +----------------------------------------------------------------------------------------------------------------+ | insertSeparator_ (self) | +----------------------------------------------------------------------------------------------------------------+ | popup_ (self, event=None) | +----------------------------------------------------------------------------------------------------------------+ -------------- Method Details -------------- .. _clear: .. method:: clear(self) Remove all items. .. _insertItem: .. method:: insertItem(self, text, menu=None, icon=None, command=None, enabled=True, checked=None, advancedTooltip=None) Inserts item and command into menu. :param text: The item text to be displayed. :type text: str :param menu: The menu object to insert. :type menu: CascadingMenu, optional :param icon: The name of the icon file. :type icon: str, optional :param command: The callback method to be executed when item is clicked. :type command: callback, optional :param enabled: Determines whether to enable the inserted item. :type enabled: bool, optional :param checked: Determines if the item is checkable. True or False makes it checkable. :type checked: bool, optional :param advancedTooltip: UUID to display advanced tooltips. :type advancedTooltip: str :returns: The index where the item has been inserted. :rtype: int .. _insertMenu: .. method:: insertMenu(self, text) Adds and returns a cascading menu. .. _insertSeparator: .. method:: insertSeparator(self) Inserts a separator in the Pop menu. .. _popup: .. method:: popup(self, event=None) Shows the Popup menu. :param event: The event to get the mouse position. :type event: MouseEvent, optional