|
Timefield
The timefield iwidget consists of a specialized entry widget that allows the user to more easily enter a time. The value in the entry is separated with colons, so that the user knows exactly which is the hour, minute and second values. The programmer can manipulate the entry field with the show public method. Relative times can be entered using the show method, such as \"2 hours ago\".The validation level can also be specified with the -iq option. The different levels are low and high, where high will not allow invalid times, and low will allow invalid times. The programmer can use the isvalid to validate the entry at a later time if the -iq option is set to low.
For further information, see the Timefield
manpage
Components: hull label time
|
wm title . "Timefield Example"
##=========================================================
## Create a Timefield iwidget
##=========================================================
##
iwidgets::timefield .tf \
-labeltext "Departure Time:" \
-textbackground #82E6C8 \
-textfont {lucida 14 bold}
pack .tf \
-fill both \
-expand true
.tf show "2 hours ago"
|
Download this sample code |
|