Name

PopupMenu

.XET N .XE1 popup menus" ./XET tixPopupMenu pathName [option value...]”

The tixPopupMenu command creates a new tixPopupMenu mega-widget named pathName. The tixPopupMenu class is derived from the tixShell class. It provides a replacement for the tk_popup command with easier configuration and a menu title.

Widget-Specific Options

-buttons buttonList (buttons, Buttons)

A list that specifies the mouse buttons and key modifiers that pop up the menu. Each item is a list with two elements: the button number and a list of key modifiers. For example, {{1 {Control Meta}} {3 {Any}}}. The default is {3 {Any}}.

-postcmd tclCommand (postCmd, PostCmd)

Command to call just before the menu is popped up. The x- and y-coordinates of the button event are appended as the final two arguments. The command must Return a boolean value to indicate whether the menu should be posted.

-spring boolean (spring, Spring)

Whether the menu should automatically pop down when the user releases the mouse button outside the menu without invoking any menu commands. The default is true. If false, the user must press the Escape key to cancel the menu.

-state state (state, State)

Current state of the tixPopupMenu. Valid values are normal and disabled. When disabled, the menu will not pop up.

-title string (title, Title)

Text for the title of the tixPopupMenu.

Subwidgets

menu

The menu widget that pops up.

menubutton

The menubutton widget used for the title.

Methods

pathName bind window [window...]

Arrange for the tixPopupMenu to be bound to the configured button events over the given windows.

pathName post window x y

Post the tixPopupMenu inside window at the coordinates x, y.

pathName unbind window [window...]

Cancel the tixPopupMenu’s binding to the given windows.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset