PageRenderTime 369ms CodeModel.GetById 216ms app.highlight 3ms RepoModel.GetById 148ms app.codeStats 0ms

/Demo/tkinter/matt/not-what-you-might-think-2.py

http://unladen-swallow.googlecode.com/
Python | 30 lines | 18 code | 10 blank | 2 comment | 0 complexity | 1d82e703e9c2d673e6bda5bff8ddbc92 MD5 | raw file
 1from Tkinter import *
 2
 3
 4class Test(Frame):
 5    def createWidgets(self):
 6
 7        self.Gpanel = Frame(self, width='1i', height='1i',
 8                            background='green')
 9
10        # this line turns off the recalculation of geometry by masters.
11        self.Gpanel.propagate(0)
12
13        self.Gpanel.pack(side=LEFT)
14
15        # a QUIT button
16        self.Gpanel.QUIT = Button(self.Gpanel, text='QUIT', foreground='red',
17                                  command=self.quit)
18        self.Gpanel.QUIT.pack(side=LEFT)
19
20    def __init__(self, master=None):
21        Frame.__init__(self, master)
22        Pack.config(self)
23        self.createWidgets()
24
25test = Test()
26
27test.master.title('packer demo')
28test.master.iconname('packer')
29
30test.mainloop()