X7ROOT File Manager
Current Path:
/lib64/python2.7/Demo/tkinter/matt
lib64
/
python2.7
/
Demo
/
tkinter
/
matt
/
ðŸ“
..
📄
00-HELLO-WORLD.py
(724 B)
📄
00-HELLO-WORLD.pyc
(1.27 KB)
📄
00-HELLO-WORLD.pyo
(1.27 KB)
📄
README
(513 B)
📄
animation-simple.py
(939 B)
📄
animation-simple.pyc
(1.68 KB)
📄
animation-simple.pyo
(1.68 KB)
📄
animation-w-velocity-ctrl.py
(1.17 KB)
📄
animation-w-velocity-ctrl.pyc
(1.98 KB)
📄
animation-w-velocity-ctrl.pyo
(1.98 KB)
📄
bind-w-mult-calls-p-type.py
(1.51 KB)
📄
bind-w-mult-calls-p-type.pyc
(1.37 KB)
📄
bind-w-mult-calls-p-type.pyo
(1.37 KB)
📄
canvas-demo-simple.py
(748 B)
📄
canvas-demo-simple.pyc
(1.39 KB)
📄
canvas-demo-simple.pyo
(1.39 KB)
📄
canvas-gridding.py
(2.22 KB)
📄
canvas-gridding.pyc
(2.27 KB)
📄
canvas-gridding.pyo
(2.27 KB)
📄
canvas-moving-or-creating.py
(2.37 KB)
📄
canvas-moving-or-creating.pyc
(2.52 KB)
📄
canvas-moving-or-creating.pyo
(2.52 KB)
📄
canvas-moving-w-mouse.py
(2.08 KB)
📄
canvas-moving-w-mouse.pyc
(2.42 KB)
📄
canvas-moving-w-mouse.pyo
(2.42 KB)
📄
canvas-mult-item-sel.py
(2.77 KB)
📄
canvas-mult-item-sel.pyc
(2.74 KB)
📄
canvas-mult-item-sel.pyo
(2.74 KB)
📄
canvas-reading-tag-info.py
(1.64 KB)
📄
canvas-reading-tag-info.pyc
(1.82 KB)
📄
canvas-reading-tag-info.pyo
(1.82 KB)
📄
canvas-w-widget-draw-el.py
(1.15 KB)
📄
canvas-w-widget-draw-el.pyc
(1.47 KB)
📄
canvas-w-widget-draw-el.pyo
(1.47 KB)
📄
canvas-with-scrollbars.py
(2.06 KB)
📄
canvas-with-scrollbars.pyc
(2.31 KB)
📄
canvas-with-scrollbars.pyo
(2.31 KB)
📄
dialog-box.py
(2.38 KB)
📄
dialog-box.pyc
(1.93 KB)
📄
dialog-box.pyo
(1.93 KB)
📄
entry-simple.py
(729 B)
📄
entry-simple.pyc
(1.05 KB)
📄
entry-simple.pyo
(1.05 KB)
📄
entry-with-shared-variable.py
(1.71 KB)
📄
entry-with-shared-variable.pyc
(1.6 KB)
📄
entry-with-shared-variable.pyo
(1.6 KB)
📄
killing-window-w-wm.py
(1.26 KB)
📄
killing-window-w-wm.pyc
(1.46 KB)
📄
killing-window-w-wm.pyo
(1.46 KB)
📄
menu-all-types-of-entries.py
(8.9 KB)
📄
menu-all-types-of-entries.pyc
(4.85 KB)
📄
menu-all-types-of-entries.pyo
(4.85 KB)
📄
menu-simple.py
(3.17 KB)
📄
menu-simple.pyc
(1.92 KB)
📄
menu-simple.pyo
(1.92 KB)
📄
not-what-you-might-think-1.py
(675 B)
📄
not-what-you-might-think-1.pyc
(1.27 KB)
📄
not-what-you-might-think-1.pyo
(1.27 KB)
📄
not-what-you-might-think-2.py
(747 B)
📄
not-what-you-might-think-2.pyc
(1.3 KB)
📄
not-what-you-might-think-2.pyo
(1.3 KB)
📄
packer-and-placer-together.py
(1.18 KB)
📄
packer-and-placer-together.pyc
(1.36 KB)
📄
packer-and-placer-together.pyo
(1.36 KB)
📄
packer-simple.py
(819 B)
📄
packer-simple.pyc
(1.39 KB)
📄
packer-simple.pyo
(1.39 KB)
📄
placer-simple.py
(1.05 KB)
📄
placer-simple.pyc
(1.26 KB)
📄
placer-simple.pyo
(1.26 KB)
📄
pong-demo-1.py
(1.51 KB)
📄
pong-demo-1.pyc
(2.08 KB)
📄
pong-demo-1.pyo
(2.08 KB)
📄
printing-coords-of-items.py
(2.34 KB)
📄
printing-coords-of-items.pyc
(2.52 KB)
📄
printing-coords-of-items.pyo
(2.52 KB)
📄
radiobutton-simple.py
(1.96 KB)
📄
radiobutton-simple.pyc
(1.82 KB)
📄
radiobutton-simple.pyo
(1.82 KB)
📄
rubber-band-box-demo-1.py
(2.08 KB)
📄
rubber-band-box-demo-1.pyc
(2.51 KB)
📄
rubber-band-box-demo-1.pyo
(2.51 KB)
📄
rubber-line-demo-1.py
(1.87 KB)
📄
rubber-line-demo-1.pyc
(2.22 KB)
📄
rubber-line-demo-1.pyo
(2.22 KB)
📄
slider-demo-1.py
(1000 B)
📄
slider-demo-1.pyc
(1.67 KB)
📄
slider-demo-1.pyo
(1.67 KB)
📄
subclass-existing-widgets.py
(677 B)
📄
subclass-existing-widgets.pyc
(1.21 KB)
📄
subclass-existing-widgets.pyo
(1.21 KB)
📄
two-radio-groups.py
(3.67 KB)
📄
two-radio-groups.pyc
(2.14 KB)
📄
two-radio-groups.pyo
(2.14 KB)
📄
window-creation-more.py
(1020 B)
📄
window-creation-more.pyc
(1.68 KB)
📄
window-creation-more.pyo
(1.68 KB)
📄
window-creation-simple.py
(815 B)
📄
window-creation-simple.pyc
(1.6 KB)
📄
window-creation-simple.pyo
(1.6 KB)
📄
window-creation-w-location.py
(1.29 KB)
📄
window-creation-w-location.pyc
(2.05 KB)
📄
window-creation-w-location.pyo
(2.05 KB)
Editing: canvas-with-scrollbars.py
from Tkinter import * # This example program creates a scrolling canvas, and demonstrates # how to tie scrollbars and canvases together. The mechanism # is analogus for listboxes and other widgets with # "xscroll" and "yscroll" configuration options. class Test(Frame): def printit(self): print "hi" def createWidgets(self): self.question = Label(self, text="Can Find The BLUE Square??????") self.question.pack() self.QUIT = Button(self, text='QUIT', background='red', height=3, command=self.quit) self.QUIT.pack(side=BOTTOM, fill=BOTH) spacer = Frame(self, height="0.25i") spacer.pack(side=BOTTOM) # notice that the scroll region (20" x 20") is larger than # displayed size of the widget (5" x 5") self.draw = Canvas(self, width="5i", height="5i", background="white", scrollregion=(0, 0, "20i", "20i")) self.draw.scrollX = Scrollbar(self, orient=HORIZONTAL) self.draw.scrollY = Scrollbar(self, orient=VERTICAL) # now tie the three together. This is standard boilerplate text self.draw['xscrollcommand'] = self.draw.scrollX.set self.draw['yscrollcommand'] = self.draw.scrollY.set self.draw.scrollX['command'] = self.draw.xview self.draw.scrollY['command'] = self.draw.yview # draw something. Note that the first square # is visible, but you need to scroll to see the second one. self.draw.create_rectangle(0, 0, "3.5i", "3.5i", fill="black") self.draw.create_rectangle("10i", "10i", "13.5i", "13.5i", fill="blue") # pack 'em up self.draw.scrollX.pack(side=BOTTOM, fill=X) self.draw.scrollY.pack(side=RIGHT, fill=Y) self.draw.pack(side=LEFT) def scrollCanvasX(self, *args): print "scrolling", args print self.draw.scrollX.get() def __init__(self, master=None): Frame.__init__(self, master) Pack.config(self) self.createWidgets() test = Test() test.mainloop()
Upload File
Create Folder