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

package require Tk



ttk::frame  .box
pack .box -fill both -expand yes -side top

ttk::button .box.tbutton1 -text "New"      -command {} -style "Toolbutton" -takefocus 1
ttk::button .box.tbutton2 -text "Open"     -command {} -style "Toolbutton" -takefocus 1
ttk::button .box.tbutton3 -text "Save"     -command {} -style "Toolbutton" -takefocus 1
ttk::separator .box.separator1 -orient vertical
ttk::button .box.tbutton4 -text "Print"    -command {} -style "Toolbutton" -takefocus 1
ttk::separator .box.separator2 -orient vertical
ttk::button .box.tbutton5 -text "Undo"     -command {} -style "Toolbutton" -takefocus 1
ttk::button .box.tbutton6 -text "Redo"     -command {} -style "Toolbutton" -takefocus 1
ttk::separator .box.separator3 -orient vertical
ttk::button .box.tbutton7 -text "Cut"      -command {} -style "Toolbutton" -takefocus 1
text .box.textarea 

pack .box.tbutton1   -anchor w -side left -padx 1 -pady 1
pack .box.tbutton2  -anchor w -side left -padx 1 -pady 1
pack .box.tbutton3   -anchor w -side left -padx 1 -pady 1
pack .box.separator1 -anchor w -side left -padx 1 -pady 1
pack .box.tbutton4   -anchor w -side left -padx 1 -pady 1
pack .box.separator2 -anchor w -side left -padx 1 -pady 1
pack .box.tbutton5   -anchor w -side left -padx 1 -pady 1
pack .box.tbutton6    -anchor w -side left -padx 1 -pady 1
pack .box.separator3 -anchor w -side left -padx 1 -pady 1
pack .box.tbutton7  -anchor w -side left -padx 1 -pady 1

pack .box.textarea