Posted to tcl by kevin_walzer at Mon Aug 05 02:03:21 GMT 2024view raw

  1. package require Tk
  2.  
  3.  
  4.  
  5. ttk::frame .box
  6. pack .box -fill both -expand yes -side top
  7.  
  8. ttk::button .box.tbutton1 -text "New" -command {} -style "Toolbutton" -takefocus 1
  9. ttk::button .box.tbutton2 -text "Open" -command {} -style "Toolbutton" -takefocus 1
  10. ttk::button .box.tbutton3 -text "Save" -command {} -style "Toolbutton" -takefocus 1
  11. ttk::separator .box.separator1 -orient vertical
  12. ttk::button .box.tbutton4 -text "Print" -command {} -style "Toolbutton" -takefocus 1
  13. ttk::separator .box.separator2 -orient vertical
  14. ttk::button .box.tbutton5 -text "Undo" -command {} -style "Toolbutton" -takefocus 1
  15. ttk::button .box.tbutton6 -text "Redo" -command {} -style "Toolbutton" -takefocus 1
  16. ttk::separator .box.separator3 -orient vertical
  17. ttk::button .box.tbutton7 -text "Cut" -command {} -style "Toolbutton" -takefocus 1
  18. text .box.textarea
  19.  
  20. pack .box.tbutton1 -anchor w -side left -padx 1 -pady 1
  21. pack .box.tbutton2 -anchor w -side left -padx 1 -pady 1
  22. pack .box.tbutton3 -anchor w -side left -padx 1 -pady 1
  23. pack .box.separator1 -anchor w -side left -padx 1 -pady 1
  24. pack .box.tbutton4 -anchor w -side left -padx 1 -pady 1
  25. pack .box.separator2 -anchor w -side left -padx 1 -pady 1
  26. pack .box.tbutton5 -anchor w -side left -padx 1 -pady 1
  27. pack .box.tbutton6 -anchor w -side left -padx 1 -pady 1
  28. pack .box.separator3 -anchor w -side left -padx 1 -pady 1
  29. pack .box.tbutton7 -anchor w -side left -padx 1 -pady 1
  30.  
  31. pack .box.textarea
  32.