⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 menu.n

📁 linux系统下的音频通信
💻 N
📖 第 1 页 / 共 3 页
字号:
\fB\-underline \fIvalue\fRSpecifies the integer index of a character to underline in the entry.This option is also queried by the default bindings and used toimplement keyboard traversal.0 corresponds to the first character of the text displayed in the entry,1 to the next character, and so on.If a bitmap or image is displayed in the entry then this option is ignored.This option is not available for separator or tear-off entries..TP\fB\-value \fIvalue\fRAvailable only for radiobutton entries.  Specifies the value tostore in the entry's associated variable when the entry is selected.If an empty string is specified, then the \fB\-label\fR optionfor the entry as the value to store in the variable..TP\fB\-variable \fIvalue\fRAvailable only for checkbutton and radiobutton entries.  Specifiesthe name of a global value to set when the entry is selected.For checkbutton entries the variable is also set when the entryis deselected.  For radiobutton entries, changing the variablecauses the currently-selected entry to deselect itself..LPThe \fBadd\fR widget command returns an empty string..RE.TP\fIpathName \fBcget\fR \fIoption\fRReturns the current value of the configuration option givenby \fIoption\fR.\fIOption\fR may have any of the values accepted by the \fBmenu\fRcommand..VS.TP\fIpathName\fR \fBclone\fR \fInewPathname ?cloneType?\fRMakes a clone of the current menu named \fInewPathName\fR. This cloneis a menu in its own right, but any changes to the clone arepropogated to the original menu and vice versa. \fIcloneType\fR can be\fBnormal\fR, \fBmenubar\fR, or \fBtearoff\fR. Should not normally becalled outside of the Tk library. See the \fBCLONES\fR section formore information..VE.TP\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?Query or modify the configuration options of the widget.If no \fIoption\fR is specified, returns a list describing all ofthe available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR forinformation on the format of this list).  If \fIoption\fR is specifiedwith no \fIvalue\fR, then the command returns a list describing theone named option (this list will be identical to the correspondingsublist of the value returned if no \fIoption\fR is specified).  Ifone or more \fIoption\-value\fR pairs are specified, then the commandmodifies the given widget option(s) to have the given value(s);  inthis case the command returns an empty string.\fIOption\fR may have any of the values accepted by the \fBmenu\fRcommand..TP\fIpathName \fBdelete \fIindex1\fR ?\fIindex2\fR?Delete all of the menu entries between \fIindex1\fR and\fIindex2\fR inclusive.If \fIindex2\fR is omitted then it defaults to \fIindex1\fR.Attempts to delete a tear-off menu entry are ignored (instead, youshould change the \fBtearOff\fR option to remove the tear-off entry)..TP\fIpathName \fBentrycget\fR \fIindex option\fRReturns the current value of a configuration option forthe entry given by \fIindex\fR.\fIOption\fR may have any of the values accepted by the \fBadd\fRwidget command..TP\fIpathName \fBentryconfigure \fIindex \fR?\fIoptions\fR?This command is similar to the \fBconfigure\fR command, except thatit applies to the options for an individual entry, whereas \fBconfigure\fRapplies to the options for the menu as a whole.\fIOptions\fR may have any of the values accepted by the \fBadd\fRwidget command.  If \fIoptions\fR are specified, options are modifiedas indicatedin the command and the command returns an empty string.If no \fIoptions\fR are specified, returns a list describingthe current options for entry \fIindex\fR (see \fBTk_ConfigureInfo\fR forinformation on the format of this list)..TP\fIpathName \fBindex \fIindex\fRReturns the numerical index corresponding to \fIindex\fR, or\fBnone\fR if \fIindex\fR was specified as \fBnone\fR..TP\fIpathName \fBinsert \fIindex\fR \fItype \fR?\fIoption value option value ...\fR?Same as the \fBadd\fR widget command except that it inserts the newentry just before the entry given by \fIindex\fR, instead of appendingto the end of the menu.  The \fItype\fR, \fIoption\fR, and \fIvalue\fRarguments have the same interpretation as for the \fBadd\fR widgetcommand.  It is not possible to insert new menu entries before thetear-off entry, if the menu has one..TP\fIpathName \fBinvoke \fIindex\fRInvoke the action of the menu entry.  See the sections on theindividual entries above for details on what happens.  If themenu entry is disabled then nothing happens.  If theentry has a command associated with it then the result of thatcommand is returned as the result of the \fBinvoke\fR widgetcommand.  Otherwise the result is an empty string.  Note:  invokinga menu entry does not automatically unpost the menu;  the defaultbindings normally take care of this before invoking the \fBinvoke\fRwidget command..TP\fIpathName \fBpost \fIx y\fRArrange for the menu to be displayed on the screen at the root-windowcoordinates given by \fIx\fR and \fIy\fR.  These coordinates areadjusted if necessary to guarantee that the entire menu is visible onthe screen.  This command normally returns an empty string.If the \fBpostCommand\fR option has been specified, then its value isexecuted as a Tcl script before posting the menu and the result ofthat script is returned as the result of the \fBpost\fR widgetcommand.If an error returns while executing the command, then the error isreturned without posting the menu..TP\fIpathName \fBpostcascade \fIindex\fRPosts the submenu associated with the cascade entry given by\fIindex\fR, and unposts any previously posted submenu.If \fIindex\fR doesn't correspond to a cascade entry,or if \fIpathName\fR isn't posted,the command has no effect except to unpost any currently postedsubmenu..TP\fIpathName \fBtype \fIindex\fRReturns the type of the menu entry given by \fIindex\fR.This is the \fItype\fR argument passed to the \fBadd\fR widgetcommand when the entry was created, such as \fBcommand\fRor \fBseparator\fR, or \fBtearoff\fR for a tear-off entry..TP.VS\fIpathName \fBunpost\fRUnmap the window so that it is no longer displayed.  If alower-level cascaded menu is posted, unpost that menu.  Returns anempty string. This subcommand does not work on Windows and theMacintosh, as those platforms have their own way of unposting menus..VE.TP\fIpathName \fByposition \fIindex\fRReturns a decimal string giving the y-coordinate within the menuwindow of the topmost pixel in the entry specified by \fIindex\fR..SH "MENU CONFIGURATIONS".PPThe default bindings support four different ways of using menus:.VS.TP\fBPulldown Menus in Menubar\fRThis is the most command case. You create a menu widget that will become themenu bar. You then add cascade entries to this menu, specifying thepull down menus you wish to use in your menu bar. You then create allof the pulldowns. Once you have done this, specify the menu using the\fB-menu\fR option of the toplevel's widget command. See the\fBtoplevel\fR manual entry for details..VE.TP\fBPulldown Menus in Menu Buttons\fRThis is the compatable way to do menu bars.  You create one menubuttonwidget for each top-level menu, and typically you arrange a series ofmenubuttons in a row in a menubar window.  You also create the top-level menusand any cascaded submenus, and tie them together with \fB\-menu\fRoptions in menubuttons and cascade menu entries.  The top-level menu mustbe a child of the menubutton, and each submenu must be a child of themenu that refers to it.  Once you have done this, the default bindingswill allow users to traverse and invoke the tree of menus via itsmenubutton;  see the \fBmenubutton\fR manual entry for details..TP\fBPopup Menus\fRPopup menus typically post in response to a mouse button press orkeystroke.  You create the popup menus and any cascaded submenus,then you call the \fBtk_popup\fR procedure at the appropriate timeto post the top-level menu..TP\fBOption Menus\fRAn option menu consists of a menubutton with an associated menuthat allows you to select one of several values.  The current valueis displayed in the menubutton and is also stored in a globalvariable.  Use the \fBtk_optionMenu\fR procedure to create optionmenubuttons and their menus..TP\fBTorn-off Menus\fRYou create a torn-off menu by invoking the tear-off entry atthe top of an existing menu.  The default bindings will create a new menuthat is a copy of the original menu and leave it permanentlyposted as a top-level window.  The torn-off menu behaves justthe same as the original menu..SH "DEFAULT BINDINGS".PPTk automatically creates class bindings for menus that give themthe following default behavior:.IP [1]When the mouse enters a menu, the entry underneath the mousecursor activates;  as the mouse moves around the menu, the activeentry changes to track the mouse..IP [2]When the mouse leaves a menu all of the entries in the menudeactivate, except in the special case where the mouse moves froma menu to a cascaded submenu..IP [3]When a button is released over a menu, the active entry (if any) is invoked.The menu also unposts unless it is a torn-off menu..IP [4]The Space and Return keys invoke the active entry andunpost the menu..IP [5]If any of the entries in a menu have letters underlined withwith \fB\-underline\fR option, then pressing one of the underlinedletters (or its upper-case or lower-case equivalent) invokes thatentry and unposts the menu..IP [6]The Escape key aborts a menu selection in progress without invoking anyentry.  It also unposts the menu unless it is a torn-off menu..IP [7]The Up and Down keys activate the next higher or lower entryin the menu.  When one end of the menu is reached, the activeentry wraps around to the other end..IP [8]The Left key moves to the next menu to the left.If the current menu is a cascaded submenu, then the submenu isunposted and the current menu entry becomes the cascade entryin the parent.If the current menu is a top-level menu posted from amenubutton, then the current menubutton is unposted and thenext menubutton to the left is posted.Otherwise the key has no effect.The left-right order of menubuttons is determined by their stackingorder:  Tk assumes that the lowest menubutton (which by defaultis the first one created) is on the left..IP [9]The Right key moves to the next menu to the right.If the current entry is a cascade entry, then the submenu isposted and the  current menu entry becomes the first entryin the submenu.Otherwise, if the current menu was posted from amenubutton, then the current menubutton is unposted and thenext menubutton to the right is posted..PPDisabled menu entries are non-responsive:  they don't activate andthey ignore mouse button presses and releases..PPThe behavior of menus can be changed by defining new bindings forindividual widgets or by redefining the class bindings..SH BUGS.PPAt present it isn't possible to use theoption database to specify values for the options to individualentries..SH KEYWORDSmenu, widget

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -