home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Practical Programming in Tcl & Tk (4th Edition)
/
TCLBOOK4.BIN
/
pc
/
exsource.old
/
28_5.tcl
< prev
next >
Wrap
Text File
|
2003-04-15
|
342b
|
17 lines
#
# Example 28-5
# A command on a radiobutton or checkbutton.
#
proc PrintByName { varname } {
upvar #0 $varname var
puts stdout "$varname = $var"
}
checkbutton $f.$b -text $item -variable $item \
-command [list PrintByName $item]
radiobutton $f.$b -variable $varname \
-text $item -value $item \
-command [list PrintByName $varname]