|
See the file man.macros. NAMEtixPopupMenu - Create and manipulate tixPopupMenu widgetsSYNOPSIStixPopupMenu pathName ?options?SUPER-CLASSThe tixPopupMenu class is derived from the TixShell class and inherits all the commands, options and subwidgets of its super-class.STANDARD OPTIONSThe PopupMenu widget supports all the standard options of a frame widget. See the options(n) manual entry for details on the standard options.WIDGET-SPECIFIC OPTIONS[-buttons buttons] A Tcl list that specifies the mouse button(s) and key modifier(s) that bring up the popup menu. Each element of this list is in turn a list that contains two elements: the first element is an integer that indicates the mouse button that brings up the popup menu; the second element specifies the key modifiers that should be used in conjunction with the mouse button. For example, the value {{1 {Control Meta}} {3 {Any}}} specifies that the popup menu can be popped up by (a) pressing mouse button 1 with either the Control or the Meta key or (b) pressing mouse button 3 with any key modifier. The default value is {{3 {Any}}}: only mouse button 3 brings up the popup menu. [-postcmd postCmd] Specifies a command to be evaluated just before the menu is about to pop-up. This command is called with two default arguments: the root x-y coordinates where the user has pressed the mouse button. This command must return a boolean value: a false indicates that the menu shouldn't be popped up at this point; a true indicates that the menu should be popped up. This option can be used to find out where the user has pressed the mouse-button and optionally disable the popup menu over certain screen areas. [-spring spring] When set to true, the menu will be automatically popped down if the user releases the mouse button outside of the menu and no menu commands will be invoked. This makes it easy for the user to cancel the popup menu without pressing the Escape key. The default value is true. [-state state] Must be either disabled or normal. The PopupMenu widget will not pop up unless its -state is set to normal. [-title title] Specifies a text string to display inside the menubutton subwidget, as the title of this PopupMenu.SUBWIDGETSName: menu Class: Menu
Name: menubutton Class: Menubutton
DESCRIPTIONThe tixPopupMenu command creates a new window (given by the pathName argument) and makes it into a PopupMenu widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the PopupMenu widget such as its cursor and relief.The Tix PopupMenu widget can be used as a replacement of the tk_popup command. The advantage of the Tix PopupMenu widget is it requires less application code to manipulate. Also, it provides a title for the popup menu, which is not available from tk_popup. WIDGET COMMANDSThe tixPopupMenu command creates a new Tcl command whose name is the same as the path name of the PopupMenu widget's window. This command may be used to invoke various operations on the widget. It has the following general form:pathName option ?arg arg ...?
PathName is the name of the command, which is the same as the PopupMenu
widget's path name. Option and the args determine the exact
behavior of the command. The following commands are possible for PopupMenu
widgets:
KEYWORDSTix(n)
Visit the GSP FreeBSD Man Page Interface. |