Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/tclsh
- package require Tk
- # Create the main menu bar with a Help-About entry
- menu .menubar
- menu .menubar.help -tearoff 0
- .menubar add cascade -label Help -menu .menubar.help -underline 0
- .menubar.help add command -label {About} \
- -accelerator F2 -underline 0 -command showAbout
- # Define a procedure - an action for Help-About
- proc showAbout {} {
- tk_messageBox -message "Application\nVersion 0.1\n\nBy Marc Carson" \
- -title {About Application} \
- -detail {Thank you for trying it out!}
- }
- # Configure the main window
- wm title . {Application}
- . configure -menu .menubar -width 300 -height 150
- bind . {<Key F1>} {showAbout}
- set cmda [list exec thunar "/home/user/Downloads"]
- set cmdb [list exec thunar "/home/user/Documents"]
- button .m.a -text "Open Downloads Folder" \
- -command $cmda
- pack .m.a -side top -pady 1 -padx 1 -fill x
- button .m.b -text "Open Documents Folder" \
- -command $cmdb
- pack .m.b -side top -pady 1 -padx 1 -fill x
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement