home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rexxtk12.zip / demo / spectcl / dlog2.ui.tcl < prev    next >
Text File  |  2000-04-23  |  2KB  |  82 lines

  1. #! /bin/sh
  2. # the next line restarts using wish \
  3. exec wish "$0" "$@"
  4.  
  5. # interface generated by SpecTcl version 1.1 from /home/ocon/rexxtk/th/demo/dlog2.ui
  6. #   root     is the parent window for this user interface
  7.  
  8. proc dlog2_ui {root args} {
  9.  
  10.     # this treats "." as a special case
  11.  
  12.     if {$root == "."} {
  13.         set base ""
  14.     } else {
  15.         set base $root
  16.     }
  17.     
  18.     label $base.label#1 \
  19.         -text Name:
  20.  
  21.     entry $base.entry#1 \
  22.         -textvariable name
  23.  
  24.     label $base.label#2 \
  25.         -text Phone:
  26.  
  27.     entry $base.entry#2 \
  28.         -textvariable phone
  29.  
  30.     button $base.button#1 \
  31.         -command {setRexxtk D2Okay} \
  32.         -text Okay
  33.  
  34.     button $base.button#2 \
  35.         -command {setRexxtk D2Cancel} \
  36.         -text Cancel
  37.  
  38.  
  39.     # Geometry management
  40.  
  41.     grid $base.label#1 -in $root    -row 1 -column 1  \
  42.         -sticky e
  43.     grid $base.entry#1 -in $root    -row 1 -column 2  \
  44.         -columnspan 2 \
  45.         -sticky ew
  46.     grid $base.label#2 -in $root    -row 2 -column 1  \
  47.         -sticky e
  48.     grid $base.entry#2 -in $root    -row 2 -column 2  \
  49.         -columnspan 2 \
  50.         -sticky ew
  51.     grid $base.button#1 -in $root    -row 3 -column 2 
  52.     grid $base.button#2 -in $root    -row 3 -column 3 
  53.  
  54.     # Resize behavior management
  55.  
  56.     grid rowconfigure $root 1 -weight 0 -minsize 30
  57.     grid rowconfigure $root 2 -weight 0 -minsize 30
  58.     grid rowconfigure $root 3 -weight 0 -minsize 30
  59.     grid columnconfigure $root 1 -weight 0 -minsize 30
  60.     grid columnconfigure $root 2 -weight 1 -minsize 140
  61.     grid columnconfigure $root 3 -weight 1 -minsize 159
  62. # additional interface code
  63. # end additional interface code
  64.  
  65. }
  66.  
  67.  
  68. # Allow interface to be run "stand-alone" for testing
  69.  
  70. catch {
  71.     if [info exists embed_args] {
  72.     # we are running in the plugin
  73.     dlog2_ui .
  74.     } else {
  75.     # we are running in stand-alone mode
  76.     if {$argv0 == [info script]} {
  77.         wm title . "Testing dlog2_ui"
  78.         dlog2_ui .
  79.     }
  80.     }
  81. }
  82.