Posted to tcl by patthoyts at Sat Jul 29 19:31:06 GMT 2006view raw

  1. # Setup a simple status bar using the sizegrip element to get the correct
  2. # graphical element in the bottom corner of the application window.
  3.  
  4. package require Tk
  5. package require tile
  6.  
  7. style theme settings default {
  8.  
  9. style layout TStatusbar {
  10. Statusbar.background
  11. Statusbar.border -children {
  12. Statusbar.padding -children {
  13. Statusbar.label -side left -sticky nsw
  14. }
  15. }
  16. Statusbar.sizegrip -side right -sticky se
  17. }
  18. style configure TStatusbar -padding {2 1} -relief sunken -font {Tahoma 8}
  19.  
  20. }
  21.  
  22. # -------------------------------------------------------------------------
  23. ttk::frame .f
  24. ttk::label .status -anchor w -text Ready. -style TStatusbar
  25. pack .status -in .f -side bottom -fill x -expand 1 -anchor s
  26. pack .f -side top -fill both -expand 1