Don't reference removed files in Makefile
[python/dscho.git] / Demo / tkinter / matt / packer-simple.py
blob4519a72df49a38044548c812a7722bae8c30b318
1 from Tkinter import *
4 class Test(Frame):
5 def printit(self):
6 print self.hi_there["command"]
8 def createWidgets(self):
9 # a hello button
10 self.QUIT = Button(self, {'text': 'QUIT',
11 'fg': 'red',
12 'command': self.quit})
14 self.QUIT.pack({'side': 'left', 'fill': 'both'})
17 self.hi_there = Button(self, {'text': 'Hello',
18 'command' : self.printit})
19 self.hi_there.pack({'side': 'left'})
21 # note how Packer defaults to {'side': 'top'}
23 self.guy2 = Button(self, {'text': 'button 2'})
24 self.guy2.pack()
26 self.guy3 = Button(self, {'text': 'button 3'})
27 self.guy3.pack()
29 def __init__(self, master=None):
30 Frame.__init__(self, master)
31 Pack.config(self)
32 self.createWidgets()
34 test = Test()
35 test.mainloop()