|
Calendar
The Calendar iwidget allows the user to choose a date from the display. It displays a month at a time, but the user can change to different months by using the buttons at the top of the widget. The month displayed can also be manipulated through the show public method. A particular date can be slected by using the select public method, and the selected value can be retrieved by using the get public method.
For further information, see the Calendar
manpage
Components: backward forward hull page
|
wm title . "Calendar Example"
##=========================================================
## Create a calendar iwidget
##=========================================================
##
iwidgets::calendar .cal \
-startday monday \
-days "M T W T F S S" \
-outline black \
-weekendbackground #CCCCCC \
-width 250 \
-height 200
pack .cal -expand yes -fill both
##
## Select yesterday as the date on the widget
##
.cal select yesterday
##
## get the selected date and display it
##
puts "Yesterday was: [.cal get]"
|
Download this sample code |
|