If you run it, you will see buttons at the top of the editor but none
of the buttons except exit work.
Add all the missing functions associated with the buttons.
Feel free to change/add to the interface look-and-feel as long as you do not remove any functionality.
Upload in Upload Area OTHER UPLOADS.
#!/usr/local/bin/wish -f
# Program: editor
# Tcl version: 8.0 (Tcl/Tk)
# Tk version: 8.0
#
# procedure to show window .
# Window manager configurations
wm positionfrom . user
wm sizefrom . user
wm geometry . +143+151
wm maxsize . 1152 866
wm minsize . 867 1
wm protocol . WM_DELETE_WINDOW {XFProcError {Application windows
can not be de
stroyed.
Please use the "Current widget path:" to show/hide windows.}}
wm title . {prnedit}
# build widget .frame0
frame .frame0 \
-background {#AE00B200C300} \
-borderwidth {2} \
-relief {raised}
# build widget .frame0.menubutton1
menubutton .frame0.menubutton1 \
-background {#AE00B200C300} \
-font {-dt-interface user-medium-r-normal-s*-*-*-*-*-*-*-*-*}
\
-foreground {#000000000000} \
-menu {.frame0.menubutton1.m} \
-padx {5} \
-pady {4} \
-text {File} \
-underline {0}
# build widget .frame0.menubutton1.m
menu .frame0.menubutton1.m \
-background {#AE00B200C300} \
-font {-dt-interface user-medium-r-normal-s*-*-*-*-*-*-*-*-*}
\
-foreground {#000000000000}
# build widget .frame0.menubutton2
menubutton .frame0.menubutton2 \
-background {#AE00B200C300} \
-font {-dt-interface user-medium-r-normal-s*-*-*-*-*-*-*-*-*}
\
-foreground {#000000000000} \
-menu {.frame0.menubutton2.m} \
-padx {5} \
-pady {4} \
-text {Help} \
-underline {0}
# build widget .frame0.menubutton2.m
menu .frame0.menubutton2.m \
-background {#AE00B200C300} \
-font {-dt-interface user-medium-r-normal-s*-*-*-*-*-*-*-*-*}
\
-foreground {#000000000000}
# build widget .text0
text .text0 \
-background {#AE00B200C300} \
-borderwidth {1} \
-font {10x20} \
-foreground {#000000000000} \
-relief {ridge} \
-wrap {word}
# build widget .button1
button .button1 \
-background {#AE00B200C300} \
-command {exit} \
-font {10x20} \
-foreground {red} \
-padx {11} \
-pady {4} \
-text {EXIT}
# build widget .button2
button .button2 \
-background {#AE00B200C300} \
-command {cut} \
-font {10x20} \
-foreground {#000000000000} \
-padx {11} \
-pady {4} \
-text {CUT} \
-width {4}
# build widget .button3
button .button3 \
-background {#AE00B200C300} \
-font {10x20} \
-foreground {#000000000000} \
-padx {11} \
-pady {4} \
-text {PASTE}
# build widget .button4
button .button4 \
-background {#AE00B200C300} \
-font {10x20} \
-foreground {#000000000000} \
-padx {11} \
-pady {4} \
-text {LINE NUMBER}
# build widget .button5
button .button5 \
-background {#AE00B200C300} \
-font {10x20} \
-foreground {#000000000000} \
-padx {11} \
-text {JUSTIFY}
# build widget .button6
button .button6 \
-background {#AE00B200C300} \
-font {10x20} \
-foreground {#000000000000} \
-padx {11} \
-pady {4} \
-text {SAVE}
# build widget .button7
button .button7 \
-background {#AE00B200C300} \
-font {10x20} \
-foreground {#000000000000} \
-padx {11} \
-pady {4} \
-text {SAVE & EXIT}
# build widget .button0
button .button0 \
-background {#AE00B200C300} \
-font {10x20} \
-foreground {#000000000000} \
-padx {11} \
-pady {4} \
-text {PRINT}
# pack master .frame0
pack configure .frame0.menubutton1 \
-side left
pack configure .frame0.menubutton2 \
-side right
# pack master .
pack configure .frame0 \
-fill x \
-ipadx 1
pack configure .text0 \
-anchor n \
-expand 1 \
-fill both \
-side bottom
pack configure .button1 \
-anchor s \
-side left
pack configure .button2 \
-anchor sw \
-side left
pack configure .button3 \
-anchor s \
-side left
pack configure .button4 \
-anchor s \
-side left
pack configure .button5 \
-side left
pack configure .button6 \
-side left
pack configure .button7 \
-side left
pack configure .button0 \
-side left
.text0 insert end {}
# eof
#