pymel.core.uitypes.PopupMenu

Inheritance diagram of PopupMenu

class PopupMenu

class counterpart of mel function popupMenu

This command creates a popup menu and attaches it to the current control if no parent is specified. The popup menu is posted with the right mouse button by default. Popup menus can be added to any kind of control, however, on some widgets, only the standard menu button (3rd mouse button) can be used to trigger popup menus. This is to meet generally accepted UI guidelines that assign the 3rd mouse button and only this one to popup menus, and also to prevent unexpected behavior of controls like text fields, that expect 1st and 2nd button to be reserved for contextual operations like text or item selection...

deleteAllItems(val=True, **kwargs)

Delete all the items in this menu.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.popupMenu

getAllowOptionBoxes(**kwargs)

Indicate whether the menu will be able to support option box menu items. An error results if an option box item is added to a menu that doesn’t allow them. This flag may be queried and must be specified when the popup menu is created. The default value is false.

Derived from mel command maya.cmds.popupMenu

getAltModifier(**kwargs)

Specify this flag if the Alt modifier must be pressed when posting the popup menu.

Derived from mel command maya.cmds.popupMenu

getButton(**kwargs)

Indicate which button posts the popup menu. Valid values range from 1 to 3 where 1 is the left most button on the mouse.

Derived from mel command maya.cmds.popupMenu

getCtrlModifier(**kwargs)

Specify this flag if the Cntl modifier must be pressed when posting the popup menu.

Derived from mel command maya.cmds.popupMenu

getItemArray(**kwargs)

Return string array of the menu item names.

Derived from mel command maya.cmds.popupMenu

getMarkingMenu(**kwargs)

Set the marking menu state of this popup menu.

Derived from mel command maya.cmds.popupMenu

getNumberOfItems(**kwargs)

Return number of items in the menu.

Derived from mel command maya.cmds.popupMenu

getPostMenuCommandOnce(**kwargs)

Indicate the -pmc/postMenuCommandshould only be invoked once. Default value is false, ie. the -pmc/postMenuCommandis invoked every time the popup menu is shown.

Derived from mel command maya.cmds.popupMenu

getShiftModifier(**kwargs)

Specify this flag if the Shift modifier must be pressed when posting the popup menu.

Derived from mel command maya.cmds.popupMenu

postMenuCommand(val=True, **kwargs)

Specify a script to be executed when the popup menu is about to be shown.

Derived from mel command maya.cmds.popupMenu

setAltModifier(val=True, **kwargs)

Specify this flag if the Alt modifier must be pressed when posting the popup menu.

Derived from mel command maya.cmds.popupMenu

setButton(val=True, **kwargs)

Indicate which button posts the popup menu. Valid values range from 1 to 3 where 1 is the left most button on the mouse.

Derived from mel command maya.cmds.popupMenu

setCtrlModifier(val=True, **kwargs)

Specify this flag if the Cntl modifier must be pressed when posting the popup menu.

Derived from mel command maya.cmds.popupMenu

setMarkingMenu(val=True, **kwargs)

Set the marking menu state of this popup menu.

Derived from mel command maya.cmds.popupMenu

setPostMenuCommandOnce(val=True, **kwargs)

Indicate the -pmc/postMenuCommandshould only be invoked once. Default value is false, ie. the -pmc/postMenuCommandis invoked every time the popup menu is shown.

Derived from mel command maya.cmds.popupMenu

setShiftModifier(val=True, **kwargs)

Specify this flag if the Shift modifier must be pressed when posting the popup menu.

Derived from mel command maya.cmds.popupMenu

Previous topic

pymel.core.uitypes.PathButtonGrp

Next topic

pymel.core.uitypes.ProgressBar

Core

Core Modules

Other Modules

This Page