arduino-0018-windows
This commit is contained in:
parent
157fd6f1a1
commit
f39fc49523
5182 changed files with 950586 additions and 0 deletions
|
@ -0,0 +1,28 @@
|
|||
# ----------------------------------------------------------------------
|
||||
# DEMO: spinner in [incr Widgets]
|
||||
# ----------------------------------------------------------------------
|
||||
package require Iwidgets 4.0
|
||||
|
||||
option add *textBackground seashell
|
||||
|
||||
proc spinMonth {win step} {
|
||||
set months {
|
||||
January February March April
|
||||
May June July August September
|
||||
October November December
|
||||
}
|
||||
|
||||
set index [expr [lsearch $months [$win get]] + $step]
|
||||
|
||||
if {$index < 0} {set index 11}
|
||||
if {$index > 11} {set index 0}
|
||||
|
||||
$win delete 0 end
|
||||
$win insert 0 [lindex $months $index]
|
||||
}
|
||||
|
||||
iwidgets::spinner .sm -labeltext "Month:" -width 10 -fixed 10 \
|
||||
-decrement {spinMonth .sm -1} -increment {spinMonth .sm 1}
|
||||
|
||||
pack .sm
|
||||
.sm insert 0 "January"
|
Reference in a new issue