]>
git.zerfleddert.de Git - micropolis/blob - src/tk/library/demos/showVars.tcl
a223ccc8cd8777b5a2db6577268fcbdfb7cef837
1 # showVars w var var var ...
3 # Create a top-level window that displays a bunch of global variable values
4 # and keeps the display up-to-date even when the variables change value
7 # w - Name to use for new top-level window.
8 # var - Name of variable to monitor.
10 proc showVars
{w args
} {
13 wm title
$w "Variable values"
14 label $w.title
-text "Variable values:" -width 20 -anchor center
\
15 -font -Adobe-helvetica
-medium
-r
-normal
--*-180*
16 pack append $w $w.title
{top fillx
}
19 label $w.
$i.name
-text "$i: "
20 label $w.
$i.value
-textvar $i
21 pack append $w.
$i $w.
$i.name left
$w.
$i.value left
22 pack append $w $w.
$i {top
frame w
}
24 button $w.ok
-text OK
-command "destroy $w"
25 pack append $w $w.ok
{bottom pady
2}