Fixes
[tcl-tlc.git] / examples / testcal.tcl
blob6b07c46102d40d7cf02318fc6456b31e685316a7
1 #!/usr/bin/itkwish3.1
3 package require TLC
4 namespace import tlc::*
5 eval [go_home]
7 Log log -threshold debug
9 proc list_holidays {y m} {
10 if {$y == 2003 && $m == 06} {
11 return {13 "USD Bank holiday" 17 "ZAR Bank holiday"}
14 return {}
18 proc newsel {date} {
19 log notice "New date selected: ($date)"
23 proc newdatesel {newdate} {
24 log notice "New datesel: ($newdate)"
28 Calendar .cal -month 6 -validfrom "2003-06-12" -validto "2003-07-24" \
29 -special_cb list_holidays -command newsel
30 Datelookup .calbut -newselection newdatesel
31 pack .cal .calbut
32 wm deiconify .
34 #after 1000 {.cal configure -fillerbg blue}
35 #after 1000 {.cal configure -weekdayheaderbg blue}
36 #after 1000 {.cal configure -availablebg blue}
37 #after 1000 {.cal configure -invalidbg blue}
38 #after 1000 {.cal configure -weekendbg blue}
39 #after 1000 {.cal configure -specialbg blue}
40 #after 1000 {.cal configure -dayfont {Helvetica -14 bold}}
41 #after 1000 {.cal configure -weekdayheaderfont {Helvetica -14 bold}}
42 #after 1000 {.cal configure -weekdayheaderfg red}
43 #after 1000 {.cal configure -availablefg red}
44 #after 1000 {.cal configure -invalidfg red}
45 #after 1000 {.cal configure -weekendfg red}
46 #after 1000 {.cal configure -specialfg red}
47 #after 1000 {.cal configure -borders red}
48 #after 3000 {.cal configure -validfrom "" -validto ""}
49 #after 4000 {.cal scroll_month -1}
50 #after 5000 {.cal scroll_month +2}
51 #after 6000 {.cal scroll_year -1}
52 #after 7000 {.cal scroll_year +2}