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