ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ns_dev/Python/learning/Tkinter/tk_test2.py
Revision: 591
Committed: Tue Nov 3 22:45:12 2015 UTC (10 years, 4 months ago) by nino.borges
Content type: text/x-python
File size: 495 byte(s)
Log Message:
Moved dir out of main dir.

File Contents

# Content
1 # File: hello2.py
2
3 from Tkinter import *
4
5 class App:
6
7 def __init__(self, master):
8
9 frame = Frame(master)
10 frame.pack()
11
12 self.button = Button(frame, text="QUIT", fg="red", command=frame.quit)
13 self.button.pack(side=LEFT)
14
15 self.hi_there = Button(frame, text="Hello", command=self.say_hi)
16 self.hi_there.pack(side=LEFT)
17
18 def say_hi(self):
19 print "hi there, everyone!"
20
21 root = Tk()
22
23 app = App(root)
24
25 root.mainloop()