home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / tls / tls085.solintel.Z / tls085.solintel / lib / vtcl / tests / radio3.tcl < prev    next >
Encoding:
Text File  |  1995-07-20  |  899 b   |  47 lines

  1. # CVS $Id: radio3.tcl,v 1.1 1995/02/03 17:15:50 zibi Exp $
  2.  
  3. global tog1 tog2 tog3 radiobox count
  4.  
  5. set count 1
  6.  
  7. proc setValueCB {cbs} {
  8.         global tog1 tog2 tog3 radiobox count
  9.  
  10.     VtSetValues $radiobox -value [set tog$count]
  11.     incr count
  12.     if {$count == 4} {
  13.         set count 1
  14.     }
  15. }
  16.  
  17. proc radioCB {cbs} {
  18. echo In radioCB
  19. echo Selected: [keylget cbs selectedWidget]
  20. }
  21.  
  22.  
  23. set app [VtOpen "testradiobox"]
  24.  
  25. set fn [VtStartForm $app.form -title "Radio Box Test" ]
  26.  
  27. set radiobox [VtRadioBox $fn.radiobox -borderWidth 2 -callback radioCB]
  28. set tog1 [VtToggleButton $radiobox.tog1]
  29. set tog2 [VtToggleButton $radiobox.tog2]
  30. set tog3 [VtToggleButton $radiobox.tog3]
  31.  
  32.  
  33.  
  34. VtPushButton $fn.SetValue -callback setValueCB \
  35.     -leftSide FORM\
  36.     -rightSide FORM\
  37.     -topOffset 10\
  38.     -leftOffset 5 \
  39.     -rightOffset 5\
  40.     -CHARM_topOffset 1\
  41.     -CHARM_leftOffset 2\
  42.     -CHARM_rightOffset 2
  43.  
  44. VtShow $fn
  45. VtMainLoop
  46.  
  47.