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

📄 selectionbox.n

📁 linux 下的源代码分析阅读器 red hat公司新版
💻 N
字号:
'\"'\" Copyright (c) 1995 DSC Technologies Corporation'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\"'\" @(#) selectionbox.n 1.21 94/12/17 16:04:44'/" .so man.macros.HS selectionbox iwid.BS'\" Note:  do not modify the .SH NAME line immediately below!.SH NAMEselectionbox \- Create and manipulate a selection box widget.SH SYNOPSIS\fBselectionbox\fI \fIpathName \fR?\fIoptions\fR?.SH "INHERITANCE"itk::Widget <- selectionbox.SH "STANDARD OPTIONS".LP.nf.ta 4c 8c 12c\fBactiveBackground\fR	\fBbackground\fR	\fBborderWidth\fR	\fBcursor\fR\fBexportSelection\fR	\fBforeground\fR	\fBhighlightColor\fR	\fBhighlightThickness\fR\fBinsertBackground\fR	\fBinsertBorderWidth\fR	\fBinsertOffTime\fR	\fBinsertOnTime\fR\fBinsertWidth\fR	\fBrelief\fR	\fBrepeatDelay\fR	\fBrepeatInterval\fR\fBselectBackground\fR	\fBselectBorderWidth\fR	\fBselectForeground\fR.fi.LPSee the "options" manual entry for details on the standard options..SH "ASSOCIATED OPTIONS".LP.nf.ta 4c 8c 12c\fBtextBackground\fR	\fBtextFont\fR.fi.LPSee the "entryfield" widget class manual entry for details on the aboveassociated options..LP.nf.ta 4c 8c 12c\fBlabelFont\fR	\fBlabelMargin\fR.fi.LPSee the "labeledwidget" class manual entry for details on the aboveassociated options..LP.nf.ta 4c 8c 12c\fBactiveRelief\fR	\fBelementBorderWidth\fR	\fBjump\fR	\fBtroughColor\fR.fi.LPSee the "scrollbar" widget class manual entry for details on the aboveassociated options..LP.nf.ta 4c 8c 12c\fBdblClickCommand\fR	\fBhscrollMode\fR	\fBsbWidth\fR	\fBscrollMargin\fR\fBtextBackground\fR	\fBtextFont\fR	\fBvscrollMode\fR.fi.LPSee the "scrolledlistbox" widget class manual entry for details on the aboveassociated options..SH "WIDGET-SPECIFIC OPTIONS".LP.nfName:	\fBchildSitePos\fRClass:	\fBPosition\fRCommand-Line Switch:	\fB-childsitepos\fR.fi.IPSpecifies the position of the child site in the selection box: \fBn\fR, \fBs\fR, \fBe\fR, \fBw\fR, or \fB\fR.  The default is center.LP.nfName:	\fBheight\fRClass:	\fBHeight\fRCommand-Line Switch:	\fB-height\fR.fi.IPSpecifies the height of the selection box.  The value may be specified in any of the forms acceptable to Tk_GetPixels.  The default is 320 pixels..LP.nfName:	\fBitemsCommand\fRClass:	\fBCommand\fRCommand-Line Switch:	\fB-itemscommand\fR.fi.IPSpecifies a command to be evaluated following selection of an item..LP.nfName:	\fBitemsLabel\fRClass:	\fBText\fRCommand-Line Switch:	\fB-itemslabel\fR.fi.IPSpecifies the text of the label for the items list.  The default is "List"..LP.nfName:	\fBitemsLabelPos\fRClass:	\fBPosition\fRCommand-Line Switch:	\fB-itemslabelpos\fR.fi.IPSpecifies the position of the label along the side of the itemslist: \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, or \fBnw\fR.  The default is nw..LP.nfName:	\fBitemsOn\fRClass:	\fBItemsOn\fRCommand-Line Switch:	\fB-itemson\fR.fi.IPSpecifies whether or not to display the items list in anyof the forms acceptable to \fBTcl_GetBoolean\fR.  The default is true..LP.nfName:	\fBmargin\fRClass:	\fBMargin\fRCommand-Line Switch:	\fB-margin\fR.fi.IPSpecifies distance between the items list and selection entry in any ofthe forms acceptable to \fBTk_GetPixels\fR.  The default is 7 pixels..LP.nfName:	\fBselectionCommand\fRClass:	\fBCommand\fRCommand-Line Switch:	\fB-selectioncommand\fR.fi.IPSpecifies a Tcl procedure to be associated with a return key press eventin the selection entry field..LP.nfName:	\fBselectionLabel\fRClass:	\fBText\fRCommand-Line Switch:	\fB-selectionlabel\fR.fi.IPSpecifies the text of the label for the selection entry field.  The defaultis "Selection"..LP.nfName:	\fBselectionLabelPos\fRClass:	\fBPosition\fRCommand-Line Switch:	\fB-selectionlabelpos\fR.fi.IPSpecifies the position of the label along the side of the selection: \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, or \fBnw\fR.  The default is nw..LP.nfName:	\fBselectionOn\fRClass:	\fBSelectionOn\fRCommand-Line Switch:	\fB-selectionon\fR.fi.IPSpecifies whether or not to display the selection entry in anyof the forms acceptable to \fBTcl_GetBoolean\fR.  The default is true..LP.nfName:	\fBwidth\fRClass:	\fBWidth\fRCommand-Line Switch:	\fB-width\fR.fi.IPSpecifies the width of the selection box.  The value may be specified in any of the forms acceptable to Tk_GetPixels.  The default is 260 pixels..LP.BE.SH DESCRIPTION.PPThe \fBselectionbox\fR command creates a scrolled list of items anda selection entry field.  The user may choose any of the items displayedin the scrolled list of alternatives and the selection field will befilled with the choice.  The user is also free to enter a new value inthe selection entry field.  Both the list and entry areas have labels.A child site is also provided in which the user may create other widgetsto be used in conjunction with the selection box..SH "METHODS".PPThe \fBselectionbox\fR command creates a new Tcl command whosename is \fIpathName\fR.  Thiscommand may be used to invoke variousoperations on the widget.  It has the following general form:.DS C\fIpathName option \fR?\fIarg arg ...\fR?.DE\fIOption\fR and the \fIarg\fRsdetermine the exact behavior of the command.  .SH "ASSOCIATED METHODS".LP.nf.ta 4c 8c 12c\fBcurselection\fR	\fBdelete\fR	\fBindex\fR	\fBnearest\fR\fBscan\fR	\fBselection\fR	\fBsize\fR.fi.LPSee the "listbox" widget class manual entry for details on the associated methods..SH "WIDGET-SPECIFIC METHODS".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 \fBselectionbox\fRcommand..TP\fIpathName \fBchildsite\fRReturns the child site widget path name..TP\fIpathName \fBclear\fR \fIcomponent\fRDelete the contents of either the selection entry widget or items list.  The \fIcomponent\fR argument may be either \fBitems\fRor \fBselection\fR..TP\fIpathName\fR \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 \fBselectionbox\fRcommand..TP\fIpathName \fBget\fRReturns the current value of the selection entry widget..TP\fIpathName \fBinsert\fR \fIcomponent\fR \fIargs\fRInsert element(s) into either the selection entry widget oritems list.  The \fIcomponent\fR argument may be either \fBitems\fRor \fBselection\fR.  The \fIargs\fR follow the rules of either an entryor list widget depending on the \fIcomponent\fR value..TP\fIpathName \fBselectitem\fRReplace the selection entry field contents with the currently selected items value..SH "COMPONENTS".LP.nfName:	\fBchildsite\fRClass:	\fBFrame\fR.fi.IPThe childsite component is the user child site for the selection box.  See the "frame" widget manual entry for details on the childsite component item..LP.nfName:	\fBitems\fRClass:	\fBScrolledlistbox\fR.fi.IPThe items component provides the scrolled list box of items for the selectionbox.  See the "scrolledlistbox" widget manual entry for details on the items component item..LP.nfName:	\fBselection\fRClass:	\fBEntryfield\fR.fi.IPThe selection component provides the entry field in the selection box fordisplay of the selected item in the items component.  See the "entryfield" widget manual entry for details on the selection component item..fi.SH EXAMPLE.DS option add *textBackground white selectionbox .sb -items {Hello {Out There} World} pack .sb -padx 10 -pady 10 -fill both -expand yes  set cs [label [.sb childsite].label -text "Child Site"] pack $cs -fill x -padx 10 -pady 10 .sb insert items 2 {Cruel Cruel} .sb selection set 1.DE.SH AUTHORMark L. Ulferts.SH KEYWORDSselectionbox, widget

⌨️ 快捷键说明

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