Last active
August 23, 2016 03:04
-
-
Save tinkerstudent/43733d78ec624e4247efa18a61aed417 to your computer and use it in GitHub Desktop.
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
| import Tkinter as tk | |
| class Application(tk.Frame): | |
| def __init__(self, master=None): | |
| tk.Frame.__init__(self, master) | |
| self.grid() | |
| self.createWidgets() | |
| def createWidgets(self): | |
| labelFrame = tk.LabelFrame(text='Application Form') | |
| labelFrame.pack() | |
| self.createEntry(labelFrame, None, 'Name') | |
| self.createEntry(labelFrame, None, 'Age') | |
| self.createEntry(labelFrame, None, 'Do you like Let It Go!') | |
| def createEntry(self, parent, titleText, labelText): | |
| labelFrame = tk.LabelFrame(parent, text=titleText) | |
| labelFrame.pack() | |
| label = tk.Label(labelFrame, text=labelText) | |
| label.pack(side=tk.LEFT) | |
| entry = tk.Entry(labelFrame) | |
| entry.pack(side=tk.LEFT) | |
| app = Application() | |
| app.master.title('BUN BUN') | |
| app.mainloop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment