PATH:
usr
/
lib64
/
python2.7
/
Demo
/
tkinter
/
matt
from Tkinter import * # this file demonstrates the creation of widgets as part of a canvas object class Test(Frame): def printhi(self): print "hi" def createWidgets(self): self.QUIT = Button(self, text='QUIT', foreground='red', command=self.quit) self.QUIT.pack(side=BOTTOM, fill=BOTH) self.draw = Canvas(self, width="5i", height="5i") self.button = Button(self, text="this is a button", command=self.printhi) # note here the coords are given in pixels (form the # upper right and corner of the window, as usual for X) # but might just have well been given in inches or points or # whatever...use the "anchor" option to control what point of the # widget (in this case the button) gets mapped to the given x, y. # you can specify corners, edges, center, etc... self.draw.create_window(300, 300, window=self.button) self.draw.pack(side=LEFT) def __init__(self, master=None): Frame.__init__(self, master) Pack.config(self) self.createWidgets() test = Test() test.mainloop()
[-] canvas-gridding.py
[edit]
[-] radiobutton-simple.py
[edit]
[-] canvas-gridding.pyc
[edit]
[-] two-radio-groups.pyo
[edit]
[-] rubber-band-box-demo-1.py
[edit]
[-] rubber-line-demo-1.py
[edit]
[-] canvas-moving-or-creating.pyo
[edit]
[-] 00-HELLO-WORLD.py
[edit]
[-] window-creation-w-location.pyc
[edit]
[-] canvas-moving-w-mouse.py
[edit]
[-] animation-simple.py
[edit]
[-] canvas-moving-w-mouse.pyc
[edit]
[-] canvas-moving-w-mouse.pyo
[edit]
[-] animation-w-velocity-ctrl.py
[edit]
[+]
..
[-] canvas-demo-simple.pyc
[edit]
[-] not-what-you-might-think-2.pyc
[edit]
[-] packer-simple.pyc
[edit]
[-] two-radio-groups.py
[edit]
[-] rubber-line-demo-1.pyc
[edit]
[-] menu-all-types-of-entries.py
[edit]
[-] killing-window-w-wm.pyc
[edit]
[-] README
[edit]
[-] canvas-moving-or-creating.pyc
[edit]
[-] animation-simple.pyo
[edit]
[-] packer-and-placer-together.py
[edit]
[-] animation-w-velocity-ctrl.pyc
[edit]
[-] pong-demo-1.pyc
[edit]
[-] rubber-band-box-demo-1.pyc
[edit]
[-] two-radio-groups.pyc
[edit]
[-] menu-all-types-of-entries.pyc
[edit]
[-] slider-demo-1.py
[edit]
[-] packer-simple.py
[edit]
[-] printing-coords-of-items.pyo
[edit]
[-] dialog-box.pyo
[edit]
[-] entry-simple.pyo
[edit]
[-] subclass-existing-widgets.pyc
[edit]
[-] window-creation-more.pyc
[edit]
[-] dialog-box.pyc
[edit]
[-] not-what-you-might-think-1.pyc
[edit]
[-] radiobutton-simple.pyo
[edit]
[-] canvas-moving-or-creating.py
[edit]
[-] placer-simple.pyc
[edit]
[-] menu-simple.pyo
[edit]
[-] rubber-band-box-demo-1.pyo
[edit]
[-] canvas-gridding.pyo
[edit]
[-] placer-simple.py
[edit]
[-] animation-w-velocity-ctrl.pyo
[edit]
[-] canvas-reading-tag-info.pyo
[edit]
[-] canvas-with-scrollbars.pyc
[edit]
[-] killing-window-w-wm.py
[edit]
[-] window-creation-w-location.py
[edit]
[-] not-what-you-might-think-2.pyo
[edit]
[-] entry-simple.pyc
[edit]
[-] entry-simple.py
[edit]
[-] rubber-line-demo-1.pyo
[edit]
[-] subclass-existing-widgets.pyo
[edit]
[-] window-creation-simple.pyo
[edit]
[-] canvas-mult-item-sel.pyo
[edit]
[-] window-creation-simple.pyc
[edit]
[-] canvas-w-widget-draw-el.pyc
[edit]
[-] canvas-with-scrollbars.pyo
[edit]
[-] window-creation-more.pyo
[edit]
[-] canvas-mult-item-sel.pyc
[edit]
[-] canvas-reading-tag-info.pyc
[edit]
[-] killing-window-w-wm.pyo
[edit]
[-] bind-w-mult-calls-p-type.pyo
[edit]
[-] entry-with-shared-variable.py
[edit]
[-] 00-HELLO-WORLD.pyc
[edit]
[-] canvas-with-scrollbars.py
[edit]
[-] pong-demo-1.pyo
[edit]
[-] window-creation-more.py
[edit]
[-] slider-demo-1.pyc
[edit]
[-] menu-simple.py
[edit]
[-] animation-simple.pyc
[edit]
[-] subclass-existing-widgets.py
[edit]
[-] canvas-w-widget-draw-el.pyo
[edit]
[-] packer-and-placer-together.pyc
[edit]
[-] bind-w-mult-calls-p-type.pyc
[edit]
[-] not-what-you-might-think-1.py
[edit]
[-] not-what-you-might-think-2.py
[edit]
[-] window-creation-simple.py
[edit]
[-] canvas-mult-item-sel.py
[edit]
[-] bind-w-mult-calls-p-type.py
[edit]
[-] entry-with-shared-variable.pyc
[edit]
[-] radiobutton-simple.pyc
[edit]
[-] dialog-box.py
[edit]
[-] menu-all-types-of-entries.pyo
[edit]
[-] canvas-demo-simple.pyo
[edit]
[-] menu-simple.pyc
[edit]
[-] slider-demo-1.pyo
[edit]
[-] canvas-w-widget-draw-el.py
[edit]
[-] 00-HELLO-WORLD.pyo
[edit]
[-] canvas-demo-simple.py
[edit]
[-] packer-simple.pyo
[edit]
[-] printing-coords-of-items.py
[edit]
[-] printing-coords-of-items.pyc
[edit]
[-] canvas-reading-tag-info.py
[edit]
[-] window-creation-w-location.pyo
[edit]
[-] not-what-you-might-think-1.pyo
[edit]
[-] pong-demo-1.py
[edit]
[-] entry-with-shared-variable.pyo
[edit]
[-] packer-and-placer-together.pyo
[edit]
[-] placer-simple.pyo
[edit]