summaryrefslogtreecommitdiff
path: root/pyohio2012/src/without_ttk.py
diff options
context:
space:
mode:
authorunknown <Jeff@Spartan.(none)>2012-07-28 11:34:24 -0400
committerunknown <Jeff@Spartan.(none)>2012-07-28 11:34:24 -0400
commita5fdf514ed77acd1ae4bf1c3442d750a921d8735 (patch)
tree393d78f6a90400de74cae6831dcb287549cf99e8 /pyohio2012/src/without_ttk.py
parent70af2d6ecf3323874bac8c7e7e90a2ae68188824 (diff)
downloadpresentations-a5fdf514ed77acd1ae4bf1c3442d750a921d8735.tar.gz
presentations-a5fdf514ed77acd1ae4bf1c3442d750a921d8735.zip
Added PyOhio2012 presentation source code
Diffstat (limited to 'pyohio2012/src/without_ttk.py')
-rw-r--r--pyohio2012/src/without_ttk.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/pyohio2012/src/without_ttk.py b/pyohio2012/src/without_ttk.py
new file mode 100644
index 0000000..b5da854
--- /dev/null
+++ b/pyohio2012/src/without_ttk.py
@@ -0,0 +1,39 @@
+from Tkinter import *
+
+class WithoutTtk():
+ def __init__(self, root):
+
+ self.frame = Frame(root)
+
+ self.build_window()
+
+ self.frame.pack(fill=BOTH)
+
+ menubar = Menu(root)
+ root['menu'] = menubar
+
+ menu_file = Menu(menubar)
+ menu_file.add_command(label="Quit", command=self.quit)
+
+ menubar.add_cascade(menu=menu_file, label='File')
+
+
+ def build_window(self):
+ label = Label(self.frame, text="How do I look?")
+ label.pack(side=TOP)
+
+ button_bad = Button(self.frame, text="Terrible", command=self.quit)
+ button_bad.pack(side=LEFT)
+
+ button_good = Button(self.frame, text="Not too shabby", command=self.quit)
+ button_good.pack(side=RIGHT)
+
+ def quit(self):
+ self.frame.quit()
+
+if __name__ == '__main__':
+ root = Tk()
+
+ app = WithoutTtk(root)
+
+ root.mainloop()