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

  1. # CVS $Id: def.tcl,v 1.3 1995/02/03 16:54:29 zibi Exp $
  2.  
  3. #@(#) def.tcl 11.4 95/01/31 
  4.  
  5. proc quitCB {cbs} {
  6.     VtClose
  7. }
  8.  
  9. proc okCB {cbs} {
  10.     global text
  11.     VtSetValues $text -value "ok"
  12. }
  13.  
  14.  
  15. proc cancelCB {cbs} {
  16.     global text
  17.     VtSetValues $text -value "cancel"
  18. }
  19.  
  20.  
  21. set app [VtOpen "defaultbuttontest"]
  22.  
  23. set form [VtFormDialog $app.form \
  24.         -title "defaultButtonTest" \
  25.         -okCallback okCB \
  26.         -cancelCallback cancelCB \
  27.         -defaultButton CANCEL \
  28.                 -cancelButton OK \
  29.                  ]
  30.  
  31. set text [VtText $form.text -value "none"]
  32. set radio [VtRadioBox $form.radio]
  33. set radio1 [VtToggleButton $radio.radio1]
  34. set radio2 [VtToggleButton $radio.radio2]
  35. set quit [VtPushButton $form.quit -callback quitCB]
  36.  
  37.  
  38. VtShow $form
  39. VtMainLoop
  40.