Skip to content

Instantly share code, notes, and snippets.

@wohhie
Created December 23, 2016 11:23
Show Gist options
  • Save wohhie/bf81a8df6491fbec36f003119739d4cb to your computer and use it in GitHub Desktop.
Save wohhie/bf81a8df6491fbec36f003119739d4cb to your computer and use it in GitHub Desktop.
Create a GUI with python tinker
from tkinter import *
class Window(Frame):
def __init__(self, master = None):
Frame.__init__(self, master)
self.master = master
self.init_window()
#init the with button
def init_window(self):
self.master.title("GUI")
self.pack(fill=BOTH, expand=1)
quitButton = Button(self, text = "Complete")
quitButton.place(x = 10, y = 10)
root = Tk()
root.geometry("400x300")
app = Window(root)
root.mainloop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment