symbian-qemu-0.9.1-12/python-2.6.1/Demo/tkinter/matt/not-what-you-might-think-2.py
changeset 1 2fb8b9db1c86
equal deleted inserted replaced
0:ffa851df0825 1:2fb8b9db1c86
       
     1 from Tkinter import *
       
     2 
       
     3 
       
     4 class 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 
       
    25 test = Test()
       
    26 
       
    27 test.master.title('packer demo')
       
    28 test.master.iconname('packer')
       
    29 
       
    30 test.mainloop()