Created
January 4, 2020 22:09
-
-
Save nspool/83785bc4175740accd879bd9adf17f34 to your computer and use it in GitHub Desktop.
Trivial example of a TK UI in Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python3 | |
from tkinter import * | |
def donothing(): | |
filewin = Toplevel(root) | |
button = Button(filewin, text="Do nothing button") | |
root = Tk() | |
menubar = Menu(root) | |
filemenu = Menu(menubar, tearoff = 0) | |
filemenu.add_command(label="New", command = donothing) | |
menubar.add_cascade(label = "File", menu = filemenu) | |
root.config(menu = menubar) | |
root.mainloop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment