/usr/lib64/python2.6/Demo/tkinter/matt
NameSizeModeActions
00-HELLO-WORLD.py7240644editdlrm
00-HELLO-WORLD.pyc12990644editdlrm
00-HELLO-WORLD.pyo12990644editdlrm
animation-simple.py9390644editdlrm
animation-simple.pyc17200644editdlrm
animation-simple.pyo17200644editdlrm
animation-w-velocity-ctrl.py12010644editdlrm
animation-w-velocity-ctrl.pyc20270644editdlrm
animation-w-velocity-ctrl.pyo20270644editdlrm
bind-w-mult-calls-p-type.py15500644editdlrm
bind-w-mult-calls-p-type.pyc14010644editdlrm
bind-w-mult-calls-p-type.pyo14010644editdlrm
canvas-demo-simple.py7480644editdlrm
canvas-demo-simple.pyc14210644editdlrm
canvas-demo-simple.pyo14210644editdlrm
canvas-gridding.py22710644editdlrm
canvas-gridding.pyc23260644editdlrm
canvas-gridding.pyo23260644editdlrm
canvas-moving-or-creating.py24220644editdlrm
canvas-moving-or-creating.pyc25850644editdlrm
canvas-moving-or-creating.pyo25850644editdlrm
canvas-moving-w-mouse.py21260644editdlrm
canvas-moving-w-mouse.pyc24730644editdlrm
canvas-moving-w-mouse.pyo24730644editdlrm
canvas-mult-item-sel.py28410644editdlrm
canvas-mult-item-sel.pyc28080644editdlrm
canvas-mult-item-sel.pyo28080644editdlrm
canvas-reading-tag-info.py16780644editdlrm
canvas-reading-tag-info.pyc18600644editdlrm
canvas-reading-tag-info.pyo18600644editdlrm
canvas-w-widget-draw-el.py11780644editdlrm
canvas-w-widget-draw-el.pyc15050644editdlrm
canvas-w-widget-draw-el.pyo15050644editdlrm
canvas-with-scrollbars.py21080644editdlrm
canvas-with-scrollbars.pyc23630644editdlrm
canvas-with-scrollbars.pyo23630644editdlrm
dialog-box.py24400644editdlrm
dialog-box.pyc19780644editdlrm
dialog-box.pyo19780644editdlrm
entry-simple.py7290644editdlrm
entry-simple.pyc10760644editdlrm
entry-simple.pyo10760644editdlrm
entry-with-shared-variable.py17470644editdlrm
entry-with-shared-variable.pyc16400644editdlrm
entry-with-shared-variable.pyo16400644editdlrm
killing-window-w-wm.py12950644editdlrm
killing-window-w-wm.pyc14930644editdlrm
killing-window-w-wm.pyo14930644editdlrm
menu-all-types-of-entries.py91100644editdlrm
menu-all-types-of-entries.pyc49710644editdlrm
menu-all-types-of-entries.pyo49710644editdlrm
menu-simple.py32510644editdlrm
menu-simple.pyc19610644editdlrm
menu-simple.pyo19610644editdlrm
not-what-you-might-think-1.py6750644editdlrm
not-what-you-might-think-1.pyc13000644editdlrm
not-what-you-might-think-1.pyo13000644editdlrm
not-what-you-might-think-2.py7470644editdlrm
not-what-you-might-think-2.pyc13350644editdlrm
not-what-you-might-think-2.pyo13350644editdlrm
packer-and-placer-together.py12090644editdlrm
packer-and-placer-together.pyc13880644editdlrm
packer-and-placer-together.pyo13880644editdlrm
packer-simple.py8190644editdlrm
packer-simple.pyc14240644editdlrm
packer-simple.pyo14240644editdlrm
placer-simple.py10780644editdlrm
placer-simple.pyc12930644editdlrm
placer-simple.pyo12930644editdlrm
pong-demo-1.py15490644editdlrm
pong-demo-1.pyc21340644editdlrm
pong-demo-1.pyo21340644editdlrm
printing-coords-of-items.py24000644editdlrm
printing-coords-of-items.pyc25840644editdlrm
printing-coords-of-items.pyo25840644editdlrm
radiobutton-simple.py20110644editdlrm
radiobutton-simple.pyc18640644editdlrm
radiobutton-simple.pyo18640644editdlrm
README5130644editdlrm
rubber-band-box-demo-1.py21340644editdlrm
rubber-band-box-demo-1.pyc25720644editdlrm
rubber-band-box-demo-1.pyo25720644editdlrm
rubber-line-demo-1.py19190644editdlrm
rubber-line-demo-1.pyc22760644editdlrm
rubber-line-demo-1.pyo22760644editdlrm
slider-demo-1.py10000644editdlrm
slider-demo-1.pyc17120644editdlrm
slider-demo-1.pyo17120644editdlrm
subclass-existing-widgets.py6770644editdlrm
subclass-existing-widgets.pyc12340644editdlrm
subclass-existing-widgets.pyo12340644editdlrm
two-radio-groups.py37580644editdlrm
two-radio-groups.pyc21920644editdlrm
two-radio-groups.pyo21920644editdlrm
window-creation-more.py10200644editdlrm
window-creation-more.pyc17190644editdlrm
window-creation-more.pyo17190644editdlrm
window-creation-simple.py8150644editdlrm
window-creation-simple.pyc16420644editdlrm
window-creation-simple.pyo16420644editdlrm
window-creation-w-location.py13250644editdlrm
window-creation-w-location.pyc21040644editdlrm
window-creation-w-location.pyo21040644editdlrm
Edit: /usr/lib64/python2.6/Demo/tkinter/matt/rubber-band-box-demo-1.py (2134B)
from Tkinter import * class Test(Frame): def printit(self): print "hi" def createWidgets(self): self.QUIT = Button(self, text='QUIT', background='red', foreground='white', height=3, command=self.quit) self.QUIT.pack(side=BOTTOM, fill=BOTH) self.canvasObject = Canvas(self, width="5i", height="5i") self.canvasObject.pack(side=LEFT) def mouseDown(self, event): # canvas x and y take the screen coords from the event and translate # them into the coordinate system of the canvas object self.startx = self.canvasObject.canvasx(event.x) self.starty = self.canvasObject.canvasy(event.y) def mouseMotion(self, event): # canvas x and y take the screen coords from the event and translate # them into the coordinate system of the canvas object x = self.canvasObject.canvasx(event.x) y = self.canvasObject.canvasy(event.y) if (self.startx != event.x) and (self.starty != event.y) : self.canvasObject.delete(self.rubberbandBox) self.rubberbandBox = self.canvasObject.create_rectangle( self.startx, self.starty, x, y) # this flushes the output, making sure that # the rectangle makes it to the screen # before the next event is handled self.update_idletasks() def mouseUp(self, event): self.canvasObject.delete(self.rubberbandBox) def __init__(self, master=None): Frame.__init__(self, master) Pack.config(self) self.createWidgets() # this is a "tagOrId" for the rectangle we draw on the canvas self.rubberbandBox = None # and the bindings that make it work.. Widget.bind(self.canvasObject, "", self.mouseDown) Widget.bind(self.canvasObject, "", self.mouseMotion) Widget.bind(self.canvasObject, "", self.mouseUp) test = Test() test.mainloop()