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

📄 entryfield.n

📁 这是一个Linux下的集成开发环境
💻 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.'\"'\" @(#) entryfield.n 1.21 94/12/17 16:04:44'/" .so man.macros.HS entryfield iwid.BS'\" Note:  do not modify the .SH NAME line immediately below!.SH NAMEentryfield \- Create and manipulate a entry field widget.SH SYNOPSIS\fBentryfield\fI \fIpathName \fR?\fIoptions\fR?.SH "INHERITANCE"itk::Widget <- LabeledWidget <- entryfield.SH "STANDARD OPTIONS".LP.nf.ta 4c 8c 12c\fBbackground\fR	\fBborderWidth\fR	\fBcursor\fR	\fBexportSelection\fR\fBforeground\fR	\fBhighlightColor\fR	\fBhighlightThickness\fR	\fBinsertBackground\fR\fBinsertBorderWidth\fR	\fBinsertOffTime\fR	\fBinsertOnTime\fR	\fBinsertWidth\fR\fBjustify\fR	\fBrelief\fR	\fBselectBackground\fR	\fBselectBorderWidth\fR\fBselectForeground\fR	\fBtextVariable\fR	\fBwidth\fR.fi.LPSee the "options" manual entry for details on the standard options..SH "ASSOCIATED OPTIONS".LP.nf.ta 4c 8c 12c\fBshow\fR	\fBstate\fR.fi.LPSee the "entry" manual entry for details on the associated options..SH "INHERITED OPTIONS".LP.nf.ta 4c 8c 12c\fBdisabledForeground\fR	\fBlabelBitmap\fR	\fBlabelFont\fR	\fBlabelImage\fR\fBlabelMargin\fR	\fBlabelPos\fR	\fBlabelText\fR	\fBlabelVariable\fR\fBstate\fR.fi.LPSee the "labeledwidget" class manual entry for details on the inherited 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 entry field: \fBn\fR, \fBs\fR, \fBe\fR, or \fBw\fR.  The default is e..LP.nfName:	\fBcommand\fRClass:	\fBCommand\fRCommand-Line Switch:	\fB-command\fR.fi.IPSpecifies a Tcl command to be executed upon detection of a Return key press event..LP.nfName:	\fBfixed\fRClass:	\fBFixed\fRCommand-Line Switch:	\fB-fixed\fR.fi.IPRestrict entry to the specified number of chars.  A value of 0, which is thedefault, denotes no limit.  The value is the maximum number of chars the user may type into the field, regardles of field width.  For example,if the field width is set to 20 and the fixed value is 10, the user will only be able to type 10 characters into the field which is 20 characters long..LP.nfName:	\fBfocusCommand\fRClass:	\fBCommand\fRCommand-Line Switch:	\fB-focuscommand\fR.fi.IPSpecifies a Tcl command to be executed upon reception of focus..LP.nfName:	\fBinvalid\fRClass:	\fBCommand\fRCommand-Line Switch:	\fB-invalid\fR.fi.IPSpecifies a Tcl command to be executed upon determination of invalid input.The default is bell..LP.nfName:	\fBtextBackground\fRClass:	\fBBackground\fRCommand-Line Switch:	\fB-textbackground\fR.fi.IPBackground color for inside textual portion of the entry field.  The valuemay be given in any of the forms acceptable to \fBTk_GetColor\fR..LP.nfName:	\fBtextFont\fRClass:	\fBFont\fRCommand-Line Switch:	\fB-textfont\fR.fi.IPName of font to use for display of text in entryfield.  The valuemay be given in any of the forms acceptable to \fBTk_GetFont\fR..LP.nfName:	\fBpasting\fRClass:	\fBBehavior\fRCommand-Line Switch:	\fB-pasting\fR.fi.IPOption to enable/disable pasting into the entry component of theentryfield.  Valid values are 0 (disabled) or 1 (enabled).Defaults to 1..LP.nfName:	\fBvalidate\fRClass:	\fBCommand\fRCommand-Line Switch:	\fB-validate\fR.fi.IPThe validate option allows specification of a validation mechanism.  Standardcharacter validation such as \fBnumeric\fR, \fBalphabetic\fR, \fBinteger\fR,\fBhexidecimal\fR, \fBreal\fR, and \fBalphanumeric\fR can be handled through the use of keywords.  Should moreextensive validation be necessary, the value may contain the name ofa command script.  The script should return a boolean value.  True for valid, false for invalid.  If false is returned, then the procedure associated with the invalid option will be invoked.If the validation script containsany \fB%\fR characters, then the script will not beexecuted directly.  Instead, a new script will begenerated by replacing each \fB%\fR, and the character followingit, with information from the entryfield.  The replacementdepends on the character following the \fB%\fR, as defined in thelist below..TP\fB%c\fRReplaced with the current input character..TP\fB%P\fRReplaced with the contents of the entryfield modified to include the latestkeystoke.  This is equivalent to peeking at the future contents, enablingrejection prior to the update..TP\fB%S\fRReplaced with the current contents of the entryfield prior to the latestkeystroke being added..TP\fB%W\fRReplaced with the entryfield widget pathname..LP.BE.SH DESCRIPTION.PPThe \fBentryfield\fR command creates an enhanced text entry widget with anoptional associated label.  Addtional options support validation and establishing a upper limit on the number of characters which may beentered in the field..DE.SH "METHODS".PPThe \fBentryfield\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 entryfield widgets:.SH "ASSOCIATED METHODS".LP.nf.ta 4c 8c 12c\fBdelete\fR	\fBget\fR	\fBicursor\fR	\fBindex\fR	\fBinsert\fR	\fBscan\fR	\fBselection\fR	\fBxview\fR	.fi.LPSee the "entry" 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 \fBentryfield\fRcommand..TP\fIpathName \fBchildsite\fRReturns the path name of the child site..TP\fIpathName \fBclear\fRClear entry widget.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 \fBentryfield\fRcommand..SH "COMPONENTS".LP.nfName:	\fBefchildsite\fRClass:	\fBframe\fR.fi.IPThe efchildsite component is the user child site for the entry field.  See the "frame" widget manual entry for details on the efchildsite component item..LP.nfName:	\fBentry\fRClass:	\fBentry\fR.fi.IPThe entry component provides the entry field for user text input and display.See the "entry" widget manual entry for details on the entry component item..fi.SH EXAMPLE.DS option add *textBackground white  proc returnCmd {} {     puts stdout "Return Pressed" }  proc invalidCmd {} {     puts stdout "Alphabetic contents invalid" }  entryfield .ef -command returnCmd  entryfield .fef -labeltext "Fixed:" -fixed 10 -width 12  entryfield .nef -labeltext "Numeric:" -validate numeric -width 12  entryfield .aef -labeltext "Alphabetic:" \\    -validate alphabetic -width 12 -invalid invalidCmd  entryfield .pef -labeltext "Password:" \\    -show \267 -width 12 -command returnCmd  Labeledwidget::alignlabels .ef .fef .nef .aef .pef pack .ef -fill x -expand yes -padx 10 -pady 5 pack .fef -fill x -expand yes -padx 10 -pady 5 pack .nef -fill x -expand yes -padx 10 -pady 5 pack .aef -fill x -expand yes -padx 10 -pady 5 pack .pef -fill x -expand yes -padx 10 -pady 5.DE.SH AUTHORSue Yockey.DEMark L. Ulferts.LP.SH KEYWORDSentryfield, widget

⌨️ 快捷键说明

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