| Itcl  | Itk  | Itcl @ Wiki  | Itcl @ SF  | Tcl  | Tcl @ Wiki |
  home || iwidgets || man pages cross ref distribution docs faq  
buttonbox
calendar
canvasprintbox
canvasprintdialog
checkbox
combobox
dateentry
datefield
dialog
dialogshell
disjointlistbox
entryfield
extbutton
extfileselectionbox
extfileselectiondialog
feedback
fileselectionbox
fileselectiondialog
finddialog
hierarchy
hyperhelp
labeledframe
labeledwidget
mainwindow
menubar
messagebox
messagedialog
notebook
optionmenu
panedwindow
promptdialog
pushbutton
radiobox
regexpfield
scrolledcanvas
scrolledframe
scrolledhtml
scrolledlistbox
scrolledtext
scrolledwidget
selectionbox
selectiondialog
shell
spindate
spinint
spinner
spintime
tabnotebook
tabset
timeentry
timefield
toolbar
watch

man page | options | methods

Datefield

The datefield iwidget is a specialty entry widget that allows the user to enter dates more readily. The date can be modified by typing in the entry or by using the show public method. The show method also accepts relative dates, as in "yesterday" or "2 days ago". By default, the current date is shown in the entry. The dates can also be automatically validated by setting the -iq option and/or the isvalid public method. For further information, see the Datefield manpage

Components: date hull label
				

wm title . "Datefield Example"

##
##  supporting procedure to print 
##  the contents of a datefield entry
##
proc print {wid} {

  puts "The date selected is: [.$wid get]"
  return
}


##=========================================================
##  Create a few Datefield iwidgets
##
##  Note that string totitle is valid for tcl_version >= 8.1
##=========================================================
##
foreach d {birthday anniversary today} {

  iwidgets::datefield .$d \
    -labeltext "[string totitle $d]:" \
    -command "print $d"

  pack .$d
}

iwidgets::Labeledwidget::alignlabels .birthday .anniversary .today

##
##  Show an initial date
##
.birthday show 1/1/2000
.anniversary show 1/1/2000

Download this sample code
man page | options | methods
 
  home || iwidgets || man pages cross ref distribution docs faq  
Copyright | Contributions | Development Team | Credits
Bugs/Comments/Suggestions about this web site