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

  1. # CVS $Id: raise.tcl,v 1.1 1995/02/03 17:15:51 zibi Exp $
  2. #
  3. # Create two information dialog and raise them using
  4. # buttons in the main form
  5. # Note VtRaise is a Noop in CHARM
  6. #
  7.  
  8.  
  9. proc testNotCharm {nm} {
  10.     if { [ VtInfo -charm ] } {
  11.         VtClose
  12.         echo "$nm: This test exercises functionality not avail in CHARM (08.03.94)"
  13.     echo "i.e. VtRaise"
  14.         echo "Test should be ignored for CHARM use"
  15.         exit 0
  16.     }
  17. }
  18.  
  19. proc raiseCB {dlog cbs} {
  20.     VtRaiseDialog $dlog
  21. }
  22.  
  23.  
  24. proc quitCB {cbs} {
  25.     VtClose
  26. }
  27.  
  28. set app [VtOpen raise]
  29. testNotCharm raise
  30.  
  31. set dlog [VtFormDialog $app.form]
  32.  
  33. # create two info boxes
  34. set info1 [VtInformationDialog $dlog.info1 -message "Info Box A" -hidden 0]
  35. set info2 [VtInformationDialog $dlog.info2 -message "Info Box B" -hidden 0]
  36.  
  37. set lab [VtLabel $dlog.lab \
  38.      -label "Raise the dialogs by \npressing on either buttons"]
  39.  
  40. VtPushButton $dlog.b1 -label "Raise A" -callback "raiseCB $info1"
  41. VtPushButton $dlog.b2 -label "Raise B" -callback "raiseCB $info2" 
  42. VtPushButton $dlog.b3 -label "Raise Me" -callback "raiseCB $dlog"
  43. VtSeparator  $dlog.s -leftSide FORM -rightSide FORM
  44. VtPushButton $dlog.q  -label "Quit"     -callback quitCB \
  45.     -leftSide FORM \
  46.     -bottomSide FORM \
  47.     -rightSide FORM
  48.  
  49.  
  50. VtShow $dlog
  51.  
  52. VtMainLoop
  53.