ActiveTcl User Guide
|
||
iwidgets::datefield pathName ?options? itk::Widget <- iwid- gets::LabeledWidget <- iwidgets::Datefield
background borderWidth cursor exportSelection foreground highlightColor highlightThickness insertBackground
tions.
herited options.
e, or w. The default is e.
key press event.
a boolean value. When set to true, the date is formatted as
that YYYY-MM-DD is supported in Tk 8.4 or later. The default is
no.
taken by the datefield during the processing of keypress events.
iq,the date prevents the user from typing in an invalid date.
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 us-
ing the date's isvalid command.
abled. If the datefield is disabled then input is not accepted.
may be given in any of the forms acceptable to Tk_GetFont. _________________________________________________________________
widget for the purpose of date entry with various degrees of built-in intelligence.
name is pathName. This command may be used to invoke various op- erations on the widget. It has the following general form:
pathName option ?arg arg ...?
option given by option. Option may have any of the values ac- cepted by the iwidgets::datefield command. pathName configure ?option? ?value option value ...? Query or modify the configura- tion options of the widget. If no option is specified, returns a list describing all of the available options for pathName (see
option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the iwid*- gets::datefield command. pathName get ?format? Returns the cur- rent contents of the datefield in a format of string or as an in- teger clock value using the -string and -clicks format options respectively. The default is by string. Reference the clock command for more information on obtaining dates and their for- mats. pathName isvalid Returns a boolean indication of the va- lidity of the currently displayed date value. For example, 03/03/1960 is valid whereas 02/29/1997 is invalid. pathName show date Changes the currently displayed date to be that of the date argument. The date may be specified either as a string, an inte- ger clock value or the keyword now". Reference the clock com- mand for more information on obtaining dates and their formats.
display. See the entry widget manual entry for details on the date component item.
package require Iwidgets 4.0
proc returnCmd {} {
puts [.df get]
}
iwidgets::datefield .df -command returnCmd
pack .df -fill x -expand yes -padx 10 -pady 10