OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [tags/] [start/] [insight/] [itcl/] [iwidgets3.0.0/] [demos/] [calendar] - Blame information for rev 578

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
#!/bin/sh
2
# ----------------------------------------------------------------------
3
#  DEMO: calendar in [incr Widgets]
4
# ----------------------------------------------------------------------
5
#\
6
exec itkwish "$0" ${1+"$@"}
7
package require Iwidgets 3.0
8
 
9
# ----------------------------------------------------------------------
10
option add *Calendar.buttonForeground black
11
option add *Calendar.outline black
12
option add *Calendar.weekdayBackground white
13
option add *Calendar.weekendBackground mistyrose
14
option add *Calendar.selectColor red
15
. configure -background white
16
 
17
iwidgets::calendar .cal
18
pack .cal -expand yes -fill both
19
 
20
iwidgets::optionmenu .days -labeltext "Start Day:" -command {
21
    set day [.days get]
22
    .cal configure -startday $day -days $caldays($day)
23
}
24
pack .days -padx 4 -pady 4
25
 
26
array set caldays {
27
    sunday {S M T W T F S}
28
    monday {Mo Tu We Th Fr Sa Su}
29
}
30
.days insert end sunday monday

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.