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

📄 listbox.n

📁 linux系统下的音频通信
💻 N
📖 第 1 页 / 共 2 页
字号:
has several forms, depending on \fIoption\fR:.RS.TP\fIpathName \fBselection anchor \fIindex\fRSets the selection anchor to the element given by \fIindex\fR..VS 8.0If \fIindex\fR refers to a non-existent element, then the closestelement is used..VEThe selection anchor is the end of the selection that is fixedwhile dragging out a selection with the mouse.The index \fBanchor\fR may be used to refer to the anchorelement..TP\fIpathName \fBselection clear \fIfirst \fR?\fIlast\fR?If any of the elements between \fIfirst\fR and \fIlast\fR(inclusive) are selected, they are deselected.The selection state is not changed for elements outsidethis range..TP\fIpathName \fBselection includes \fIindex\fRReturns 1 if the element indicated by \fIindex\fR is currentlyselected, 0 if it isn't..TP\fIpathName \fBselection set \fIfirst \fR?\fIlast\fR?Selects all of the elements in the range between\fIfirst\fR and \fIlast\fR, inclusive, without affectingthe selection state of elements outside that range..RE.TP\fIpathName \fBsize\fRReturns a decimal string indicating the total number of elementsin the listbox..TP\fIpathName \fBxview \fIargs\fRThis command is used to query and change the horizontal position of theinformation in the widget's window.  It can take any of the followingforms:.RS.TP\fIpathName \fBxview\fRReturns a list containing two elements.Each element is a real fraction between 0 and 1;  together they describethe horizontal span that is visible in the window.For example, if the first element is .2 and the second element is .6,20% of the listbox's text is off-screen to the left, the middle 40% is visiblein the window, and 40% of the text is off-screen to the right.These are the same values passed to scrollbars via the \fB\-xscrollcommand\fRoption..TP\fIpathName \fBxview\fR \fIindex\fRAdjusts the view in the window so that the character position given by\fIindex\fR is displayed at the left edge of the window.Character positions are defined by the width of the character \fB0\fR..TP\fIpathName \fBxview moveto\fI fraction\fRAdjusts the view in the window so that \fIfraction\fR of thetotal width of the listbox text is off-screen to the left.\fIfraction\fR must be a fraction between 0 and 1..TP\fIpathName \fBxview scroll \fInumber what\fRThis command shifts the view in the window left or right according to\fInumber\fR and \fIwhat\fR.\fINumber\fR must be an integer.\fIWhat\fR must be either \fBunits\fR or \fBpages\fR or an abbreviationof one of these.If \fIwhat\fR is \fBunits\fR, the view adjusts left or right by\fInumber\fR character units (the width of the \fB0\fR character)on the display;  if it is \fBpages\fR then the view adjusts by\fInumber\fR screenfuls.If \fInumber\fR is negative then characters farther to the leftbecome visible;  if it is positive then characters farther to the rightbecome visible..RE.TP\fIpathName \fByview \fI?args\fR?This command is used to query and change the vertical position of thetext in the widget's window.It can take any of the following forms:.RS.TP\fIpathName \fByview\fRReturns a list containing two elements, both of which are real fractionsbetween 0 and 1.The first element gives the position of the listbox element at thetop of the window, relative to the listbox as a whole (0.5 meansit is halfway through the listbox, for example).The second element gives the position of the listbox element just afterthe last one in the window, relative to the listbox as a whole.These are the same values passed to scrollbars via the \fB\-yscrollcommand\fRoption..TP\fIpathName \fByview\fR \fIindex\fRAdjusts the view in the window so that the element given by\fIindex\fR is displayed at the top of the window..TP\fIpathName \fByview moveto\fI fraction\fRAdjusts the view in the window so that the element given by \fIfraction\fRappears at the top of the window.\fIFraction\fR is a fraction between 0 and 1;  0 indicates the firstelement in the listbox, 0.33 indicates the element one-third theway through the listbox, and so on..TP\fIpathName \fByview scroll \fInumber what\fRThis command adjusts the view in the window up or down according to\fInumber\fR and \fIwhat\fR.\fINumber\fR must be an integer.\fIWhat\fR must be either \fBunits\fR or \fBpages\fR.If \fIwhat\fR is \fBunits\fR, the view adjusts up or down by\fInumber\fR lines;  if it is \fBpages\fR thenthe view adjusts by \fInumber\fR screenfuls.If \fInumber\fR is negative then earlier elementsbecome visible;  if it is positive then later elementsbecome visible..RE.SH "DEFAULT BINDINGS".PPTk automatically creates class bindings for listboxes that give themMotif-like behavior.  Much of the behavior of a listbox is determinedby its \fBselectMode\fR option, which selects one of four waysof dealing with the selection..PPIf the selection mode is \fBsingle\fR or \fBbrowse\fR, at most oneelement can be selected in the listbox at once.In both modes, clicking button 1 on an element selectsit and deselects any other selected item.In \fBbrowse\fR mode it is also possible to drag the selectionwith button 1..PPIf the selection mode is \fBmultiple\fR or \fBextended\fR,any number of elements may be selected at once, including discontiguousranges.  In \fBmultiple\fR mode, clicking button 1 on an elementtoggles its selection state without affecting any other elements.In \fBextended\fR mode, pressing button 1 on an element selectsit, deselects everything else, and sets the anchor to the elementunder the mouse;  dragging the mouse with button 1down extends the selection to include all the elements betweenthe anchor and the element under the mouse, inclusive..PPMost people will probably want to use \fBbrowse\fR mode forsingle selections and \fBextended\fR mode for multiple selections;the other modes appear to be useful only in special situations..PPIn addition to the above behavior, the following additional behavioris defined by the default bindings:.IP [1]In \fBextended\fR mode, the selected range can be adjusted by pressingbutton 1 with the Shift key down:  this modifies the selection toconsist of the elements between the anchor and the element underthe mouse, inclusive.The un-anchored end of this new selection can also be dragged withthe button down..IP [2]In \fBextended\fR mode, pressing button 1 with the Control key downstarts a toggle operation: the anchor is set to the element underthe mouse, and its selection state is reversed.  The selection stateof other elements isn't changed.If the mouse is dragged with button 1 down, then the selection stateof all elements between the anchor and the element under the mouseis set to match that of the anchor element;  the selection state ofall other elements remains what it was before the toggle operationbegan..IP [3]If the mouse leaves the listbox window with button 1 down, the windowscrolls away from the mouse, making information visible that usedto be off-screen on the side of the mouse.The scrolling continues until the mouse re-enters the window, thebutton is released, or the end of the listbox is reached..IP [4]Mouse button 2 may be used for scanning.If it is pressed and dragged over the listbox, the contents ofthe listbox drag at high speed in the direction the mouse moves..IP [5]If the Up or Down key is pressed, the location cursor (activeelement) moves up or down one element.If the selection mode is \fBbrowse\fR or \fBextended\fR then thenew active element is also selected and all other elements aredeselected.In \fBextended\fR mode the new active element becomes theselection anchor..IP [6]In \fBextended\fR mode, Shift-Up and Shift-Down move the locationcursor (active element) up or down one element and also extendthe selection to that element in a fashion similar to draggingwith mouse button 1..IP [7]The Left and Right keys scroll the listbox view left and rightby the width of the character \fB0\fR.Control-Left and Control-Right scroll the listbox view left andright by the width of the window.Control-Prior and Control-Next also scroll left and right bythe width of the window..IP [8]The Prior and Next keys scroll the listbox view up and downby one page (the height of the window)..IP [9]The Home and End keys scroll the listbox horizontally tothe left and right edges, respectively..IP [10]Control-Home sets the location cursor to the the first element inthe listbox, selects that element, and deselects everything elsein the listbox..IP [11]Control-End sets the location cursor to the the last element inthe listbox, selects that element, and deselects everything elsein the listbox..IP [12]In \fBextended\fR mode, Control-Shift-Home extends the selectionto the first element in the listbox and Control-Shift-End extendsthe selection to the last element..IP [13]In \fBmultiple\fR mode, Control-Shift-Home moves the location cursorto the first element in the listbox and Control-Shift-End movesthe location cursor to the last element..IP [14]The space and Select keys make a selection at the location cursor(active element) just as if mouse button 1 had been pressed overthis element..IP [15]In \fBextended\fR mode, Control-Shift-space and Shift-Selectextend the selection to the active element just as if button 1had been pressed with the Shift key down..IP [16]In \fBextended\fR mode, the Escape key cancels the most recentselection and restores all the elements in the selected rangeto their previous selection state..IP [17]Control-slash selects everything in the widget, except in\fBsingle\fR and \fBbrowse\fR modes, in which case it selectsthe active element and deselects everything else..IP [18]Control-backslash deselects everything in the widget, except in\fBbrowse\fR mode where it has no effect..IP [19]The F16 key (labelled Copy on many Sun workstations) or Meta-wcopies the selection in the widget to the clipboard, if there isa selection..PPThe behavior of listboxes can be changed by defining new bindings forindividual widgets or by redefining the class bindings..SH KEYWORDSlistbox, widget

⌨️ 快捷键说明

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