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

📄 labeledwidget.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.'\"'\" @(#) labeledwidget.n 1.21 94/12/17 16:04:44'/" .so man.macros.HS labeledwidget iwid.BS'\" Note:  do not modify the .SH NAME line immediately below!.SH NAMElabeledwidget \- Create and manipulate a labeled widget.SH SYNOPSIS\fBlabeledwidget\fI \fIpathName \fR?\fIoptions\fR?.SH "INHERITANCE"itk::Widget <- labeledwidget.SH "STANDARD OPTIONS".LP.nf.ta 4c 8c 12c\fBbackground\fR	\fBcursor\fR	\fBforeground\fR.fi.LPSee the "options" manual entry for details on the standard options..SH "WIDGET-SPECIFIC OPTIONS".LP.nfName:	\fBdisabledForeground\fRClass:	\fBDisabledForeground\fRCommand-Line Switch:	\fB-disabledforeground\fR.fi.IPSpecifies the foreground to be used when the state is disabled. .LP.nfName:	\fBlabelBitmap\fRClass:	\fBBitmap\fRCommand-Line Switch:	\fB-labelbitmap\fR.fi.IPSpecifies a bitmap to display in the widget, in any of the forms acceptable to \fBTk_GetBitmap\fR.  This option overrides the \fIlabeltext\fRoption..LP.nfName:	\fBlabelFont\fRClass:	\fBFont\fRCommand-Line Switch:	\fB-labelfont\fR.fi.IPSpecifies the font to be used for the label..LP.nfName:	\fBlabelImage\fRClass:	\fBImage\fRCommand-Line Switch:	\fB-labelimage\fR.fi.IPSpecifies a image to be used as the label. The image may be any of thevalues created by the \fBimage create\fR command.  This option overridesboth the \fIlabelbitmap\fR and \fIlabeletext\fR options..LP.nfName:	\fBlabelMargin\fRClass:	\fBMargin\fRCommand-Line Switch:	\fB-labelmargin\fR.fi.IPSpecifies the distance between the childsite and label in any of the formsacceptable to \fBTk_GetPixels\fR.  The default is 2 pixel..LP.nfName:	\fBlabelPos\fRClass:	\fBPosition\fRCommand-Line Switch:	\fB-labelpos\fR.fi.IPSpecifies the position of the label along the side of the childsite: \fBnw\fR, \fBn\fR, \fBne\fR, \fBsw\fR, \fBs\fR, \fBse\fR, \fBen\fR, \fBe\fR, \fBes\fR, \fBwn\fR, \fBw\fR, or \fBws\fR.  The default is w..LP.nfName:	\fBlabelText\fRClass:	\fBText\fRCommand-Line Switch:	\fB-labeltext\fR.fi.IPSpecifies the text of the label around the childsite..LP.nfName:	\fBlabelVariable\fRClass:	\fBVariable\fRCommand-Line Switch:	\fB-labelvariable\fR.fi.IPSpecifies the text variable of the label around the childsite..LP.nfName:	\fBstate\fRClass:	\fBState\fRCommand-Line Switch:	\fB-state\fR.fi.IPSpecifies one of two states for the label: \fBnormal\fR or \fBdisabled\fR.If the label is disabled then it is displayed in a disabled foregroundcolor.  The default is normal..LP.BE.SH DESCRIPTION.PPThe \fBlabeledwidget\fR command creates a labeled widget which contains a label and child site.  The child site is a frame which can filled with any widget via a derived class or though the use of the childsite method.  This classwas designed to be a general purpose base class for supporting the combination of label widget and a childsite.  The options include theability to position the label around the childsite widget, modify thefont and margin, and control the display of the labels..SH "METHODS".PPThe \fBlabeledwidget\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.  The followingcommands are possible for labeledwidget widgets:.SH "WIDGET-SPECIFIC METHODS".TP\fIpathName \fBchildsite\fRReturn the path name of the child site..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 \fBlabeledwidget\fRcommand..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 \fBlabeledwidget\fRcommand..SH "STATIC METHODS".TP\fBLabeledwidget::alignlabels\fR \fIwidget\fR ?\fIwidget ...\fR?The alignlabels procedure takes a list of widgets derived fromthe Labeledwidget class and uses the label margin to make each widgethave the same total space for the combination of label and margin.  Thenet effect is to left align the labels.  Generally, this method is only useful with a label position of w, which is the default..SH "COMPONENTS".LP.nfName:	\fBlabel\fRClass:	\fBlabel\fR.fi.IPThe label component provides the label for the labeled widget.  See the "label" widget manual entry for details on the label component item..LP.nfName:	\fBlwchildsite\fRClass:	\fBframe\fR.fi.IPThe lwchildsite component is the user child site for the labeled widget.  See the "frame" widget manual entry for details on the lwchildsite component item..fi.SH EXAMPLE.IPThe labeledwidget was primarily meant to be a base class.  TheScrolledListBox and EntryField are good examples of derivedclasses of the labeledwidget class.  In order to provide equalsupport for composite classes, the 'childsite' methods also exists.The following is an example of 'childsite' method usage..LP.DS labeledwidget .lw -labeltext "Canvas Widget" -labelpos s pack .lw -fill both -expand yes -padx 10 -pady 10 set cw [canvas [.lw childsite].c -relief raised -width 200 -height 200] pack $cw -padx 10 -pady 10.DE.SH AUTHORMark L. Ulferts.SH KEYWORDSlabeledwidget, widget

⌨️ 快捷键说明

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