📄 datefield.n
字号:
'\"'\" Copyright (c) 1997 DSC Technologies Corporation'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\"'\" @(#) datefield.n 1.0 97/04/30 16:04:44'/" .so man.macros.HS datefield iwid.BS'\" Note: do not modify the .SH NAME line immediately below!.SH NAMEdatefield \- Create and manipulate a date field widget.SH SYNOPSIS\fBdatefield\fI \fIpathName \fR?\fIoptions\fR?.SH "INHERITANCE"itk::Widget <- LabeledWidget <- datefield.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\fBjustify\fR \fBrelief\fR.fi.LPSee the "options" manual entry for details on the standard 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 date 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: \fBiq\fRClass: \fBIq\fRCommand-Line Switch: \fB-iq\fR.fi.IPSpecifies the level of intelligence to be shown in the actionstaken by the datefield during the processing of keypress events.Valid settings include \fBhigh\fR, \fBaverage\fR, and \fBlow\fR. With a high iq,the date prevents the user from typing in an invalid date. For example, if the current date is 05/31/1997 and the user changes the month to 04, then the day will be instantly modified for them to be 30. In addition, leap years are fully taken into account. With average iq, the month is limited to the values of 01-12, but it is possible to type in an invalid day. A setting of low iq instructs the widget to do no validity checking at all during date entry. With both average and low iq levels, it is assumed that the validity will be determined at a later time using the date's \fBisvalid\fR command..LP.nfName: \fBstate\fRClass: \fBState\fRCommand-Line Switch: \fB-state\fR.fi.IPSpecifies one of two states for the datefield: \fBnormal\fR or \fBdisabled\fR.If the datefield is disabled then input is not accepted. The default isnormal..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 datefield. The valuemay be given in any of the forms acceptable to \fBTk_GetFont\fR..LP.BE.SH DESCRIPTION.PPThe \fBdatefield\fR command creates an enhanced text entry widget forthe purpose of date entry with various degrees of built-in intelligence..DE.SH "METHODS".PPThe \fBdatefield\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 datefield widgets:.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 \fBdatefield\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 \fBdatefield\fRcommand..TP\fIpathName \fBget\fR ?\fBformat\fR?Returns the current contents of the datefield in a format of string or as an integer clock value using the \fB-string\fR and \fB-clicks\fRformat options respectively. The default is by string. Reference the clock command for more information on obtaining dates and their formats..TP\fIpathName \fBisvalid\fRReturns a boolean indication of the validity of the currentlydisplayed date value. For example, 03/03/1960 is valid whereas02/29/1997 is invalid..TP\fIpathName \fBshow\fR \fIdate\fRChanges the currently displayed date to be that of the date argument. The date may be specified either as a string, aninteger clock value or the keyword "now". Reference the clock command for more information on obtaining dates and their formats..SH "COMPONENTS".LP.nfName: \fBdate\fRClass: \fBEntry\fR.fi.IPThe date component provides the entry field for date input and display.See the "entry" widget manual entry for details on the date component item..fi.SH EXAMPLE.DS proc returnCmd {} { puts [.df get] } datefield .df -command returnCmd pack .df -fill x -expand yes -padx 10 -pady 10.DE.SH AUTHORMark L. Ulferts.LP.SH KEYWORDSdatefield, widget
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -