home *** CD-ROM | disk | FTP | other *** search
- # CVS $Id: radio3.tcl,v 1.1 1995/02/03 17:15:50 zibi Exp $
-
- global tog1 tog2 tog3 radiobox count
-
- set count 1
-
- proc setValueCB {cbs} {
- global tog1 tog2 tog3 radiobox count
-
- VtSetValues $radiobox -value [set tog$count]
- incr count
- if {$count == 4} {
- set count 1
- }
- }
-
- proc radioCB {cbs} {
- echo In radioCB
- echo Selected: [keylget cbs selectedWidget]
- }
-
-
- set app [VtOpen "testradiobox"]
-
- set fn [VtStartForm $app.form -title "Radio Box Test" ]
-
- set radiobox [VtRadioBox $fn.radiobox -borderWidth 2 -callback radioCB]
- set tog1 [VtToggleButton $radiobox.tog1]
- set tog2 [VtToggleButton $radiobox.tog2]
- set tog3 [VtToggleButton $radiobox.tog3]
-
-
-
- VtPushButton $fn.SetValue -callback setValueCB \
- -leftSide FORM\
- -rightSide FORM\
- -topOffset 10\
- -leftOffset 5 \
- -rightOffset 5\
- -CHARM_topOffset 1\
- -CHARM_leftOffset 2\
- -CHARM_rightOffset 2
-
- VtShow $fn
- VtMainLoop
-
-