home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 June / PCWorld_2005-06_cd.bin / software / vyzkuste / firewally / firewally.exe / framework-2.3.exe / toolbar < prev    next >
Text File  |  2003-09-01  |  2KB  |  46 lines

  1. # ----------------------------------------------------------------------
  2. #  DEMO: toolbar in [incr Widgets]
  3. # ----------------------------------------------------------------------
  4. package require Iwidgets 4.0
  5.  
  6. label .status -textvariable statusVar -width 40 -anchor w
  7. pack .status -side bottom
  8.  
  9. iwidgets::toolbar .tb -helpvariable statusVar -orient vertical
  10. pack .tb -side left -anchor nw -padx 4 -pady 4
  11.  
  12. set imagedir [file join ${iwidgets::library} demos images]
  13.  
  14. .tb add button select \
  15.     -helpstr "Select drawing elements" \
  16.     -image [image create photo -file [file join $imagedir select.gif]] \
  17.     -balloonstr "Selection tool" \
  18.     -command {puts "tool: select"}
  19.  
  20. .tb add button magnify \
  21.     -helpstr "Magnify drawing area" \
  22.     -image [image create photo -file [file join $imagedir mag.gif]] \
  23.     -balloonstr "Zoom tool" \
  24.     -command {puts "tool: magnify"}
  25.  
  26. .tb add button ruler \
  27.     -helpstr "Measure distances on drawing" \
  28.     -image [image create photo -file [file join $imagedir ruler.gif]] \
  29.     -balloonstr "Ruler tool" \
  30.     -command {puts "tool: ruler"}
  31.  
  32. .tb add frame filler \
  33.     -borderwidth 1 \
  34.     -width 10 \
  35.     -height 10
  36.  
  37. .tb add button poly \
  38.     -helpstr "Draw a polygon" \
  39.     -image [image create photo -file [file join $imagedir poly.gif]] \
  40.     -balloonstr "Polygon tool" \
  41.     -command {puts "tool: polygon"}
  42.  
  43. canvas .worksp -width 2i -height 3i \
  44.     -borderwidth 2 -relief sunken -background white
  45. pack .worksp -side right -expand yes -fill both -padx 4 -pady 4
  46.