5 set win
[winsys window
"red" "win0" $::win_x $::win_y 180 120 "title"]
8 set ok
[$win button "ok" 2 $([$win geth
]-9-12) -1 -1 "O&K" [lambda
{me
} {
14 puts -nonewline "cb1: "
15 puts [[$win "cb1"] getstate
]
17 puts -nonewline "cb2: "
18 puts [[$win "cb2"] getstate
]
20 puts -nonewline "radiogroup 'rgroup1': "
21 puts [$win getradioactive
"rgroup1"]
23 puts -nonewline "rb1 group: "
24 puts [[$win "g1r1"] getgroup
]
26 puts -nonewline "rb1: "
27 puts [[$win "g1r1"] getradioactive
]
29 puts -nonewline "rb2: "
30 puts [[$win "g1r2"] getradioactive
]
32 puts -nonewline "edt: \["
33 puts -nonewline [[$win "led0"] gettext
]
39 set cancel
[$win button "cancel" $([$ok getx
]+[$ok getw
]+2) [$ok gety
] -1 -1 "Cancel" [lambda
{me
} {
40 #puts [winsys type $me]
46 set st
[$win static
"static_name" 2 2 -1 -1 "&name:"]
48 set le
[$win lineedit
"led0" $([$st getx
]+[$st getw
]+2) [$st gety
] 60 -1 "text"]
51 set cb1
[$win checkbox
"cb1" [$st getx
] $([$st gety
]+[$st geth
]+1) -1 -1 "checkbox &1"]
54 set cb2
[$win checkbox
"cb2" [$cb1 getx
] $([$cb1 gety
]+[$cb1 geth
]+1) -1 -1 "checkbox &2"]
57 set rb1
[$win radio
"rgroup1" "g1r1" $([$cb2 getx
]+4) $([$cb2 gety
]+[$cb2 geth
]+12) -1 -1 "r&adio 1"]
59 set rb2
[$win radio
"rgroup1" "g1r2" [$rb1 getx
] $([$rb1 gety
]+[$rb1 geth
]+1) -1 -1 "ra&dio 2"]
62 set frm
[$win frame "frm" $([$rb1 getx
]-3) $([$rb1 gety
]-9) 61 31 "frame"]
64 set hsb
[$win scrollbar horiz
"hsb" [$rb1 getx
] $([$frm gety
]+[$frm geth
]+4) 64]
66 set vsb
[$win scrollbar vert
"vsb" $([$hsb getx
]+[$hsb getw
]+4) $([$hsb gety
]-32) 60]
69 set lsb
[$win listbox "lsb" 100 10 60 90]
74 $lsb additem
"item $ic"
77 set ::win_x $($::win_x + 16)
78 set ::win_y $($::win_y + 16)
79 if {$::win_x > 300} { set ::win_x 1 }
80 if {$::win_y > 220} { set ::win_y 1 }