/
usr
/
lib64
/
python2.6
/
Demo
/
tkinter
/
matt
/
/usr/lib64/python2.6/Demo/tkinter/matt
mkdir
upload
Name
Size
Mode
Actions
00-HELLO-WORLD.py
724
0644
edit
dl
rm
00-HELLO-WORLD.pyc
1299
0644
edit
dl
rm
00-HELLO-WORLD.pyo
1299
0644
edit
dl
rm
animation-simple.py
939
0644
edit
dl
rm
animation-simple.pyc
1720
0644
edit
dl
rm
animation-simple.pyo
1720
0644
edit
dl
rm
animation-w-velocity-ctrl.py
1201
0644
edit
dl
rm
animation-w-velocity-ctrl.pyc
2027
0644
edit
dl
rm
animation-w-velocity-ctrl.pyo
2027
0644
edit
dl
rm
bind-w-mult-calls-p-type.py
1550
0644
edit
dl
rm
bind-w-mult-calls-p-type.pyc
1401
0644
edit
dl
rm
bind-w-mult-calls-p-type.pyo
1401
0644
edit
dl
rm
canvas-demo-simple.py
748
0644
edit
dl
rm
canvas-demo-simple.pyc
1421
0644
edit
dl
rm
canvas-demo-simple.pyo
1421
0644
edit
dl
rm
canvas-gridding.py
2271
0644
edit
dl
rm
canvas-gridding.pyc
2326
0644
edit
dl
rm
canvas-gridding.pyo
2326
0644
edit
dl
rm
canvas-moving-or-creating.py
2422
0644
edit
dl
rm
canvas-moving-or-creating.pyc
2585
0644
edit
dl
rm
canvas-moving-or-creating.pyo
2585
0644
edit
dl
rm
canvas-moving-w-mouse.py
2126
0644
edit
dl
rm
canvas-moving-w-mouse.pyc
2473
0644
edit
dl
rm
canvas-moving-w-mouse.pyo
2473
0644
edit
dl
rm
canvas-mult-item-sel.py
2841
0644
edit
dl
rm
canvas-mult-item-sel.pyc
2808
0644
edit
dl
rm
canvas-mult-item-sel.pyo
2808
0644
edit
dl
rm
canvas-reading-tag-info.py
1678
0644
edit
dl
rm
canvas-reading-tag-info.pyc
1860
0644
edit
dl
rm
canvas-reading-tag-info.pyo
1860
0644
edit
dl
rm
canvas-w-widget-draw-el.py
1178
0644
edit
dl
rm
canvas-w-widget-draw-el.pyc
1505
0644
edit
dl
rm
canvas-w-widget-draw-el.pyo
1505
0644
edit
dl
rm
canvas-with-scrollbars.py
2108
0644
edit
dl
rm
canvas-with-scrollbars.pyc
2363
0644
edit
dl
rm
canvas-with-scrollbars.pyo
2363
0644
edit
dl
rm
dialog-box.py
2440
0644
edit
dl
rm
dialog-box.pyc
1978
0644
edit
dl
rm
dialog-box.pyo
1978
0644
edit
dl
rm
entry-simple.py
729
0644
edit
dl
rm
entry-simple.pyc
1076
0644
edit
dl
rm
entry-simple.pyo
1076
0644
edit
dl
rm
entry-with-shared-variable.py
1747
0644
edit
dl
rm
entry-with-shared-variable.pyc
1640
0644
edit
dl
rm
entry-with-shared-variable.pyo
1640
0644
edit
dl
rm
killing-window-w-wm.py
1295
0644
edit
dl
rm
killing-window-w-wm.pyc
1493
0644
edit
dl
rm
killing-window-w-wm.pyo
1493
0644
edit
dl
rm
menu-all-types-of-entries.py
9110
0644
edit
dl
rm
menu-all-types-of-entries.pyc
4971
0644
edit
dl
rm
menu-all-types-of-entries.pyo
4971
0644
edit
dl
rm
menu-simple.py
3251
0644
edit
dl
rm
menu-simple.pyc
1961
0644
edit
dl
rm
menu-simple.pyo
1961
0644
edit
dl
rm
not-what-you-might-think-1.py
675
0644
edit
dl
rm
not-what-you-might-think-1.pyc
1300
0644
edit
dl
rm
not-what-you-might-think-1.pyo
1300
0644
edit
dl
rm
not-what-you-might-think-2.py
747
0644
edit
dl
rm
not-what-you-might-think-2.pyc
1335
0644
edit
dl
rm
not-what-you-might-think-2.pyo
1335
0644
edit
dl
rm
packer-and-placer-together.py
1209
0644
edit
dl
rm
packer-and-placer-together.pyc
1388
0644
edit
dl
rm
packer-and-placer-together.pyo
1388
0644
edit
dl
rm
packer-simple.py
819
0644
edit
dl
rm
packer-simple.pyc
1424
0644
edit
dl
rm
packer-simple.pyo
1424
0644
edit
dl
rm
placer-simple.py
1078
0644
edit
dl
rm
placer-simple.pyc
1293
0644
edit
dl
rm
placer-simple.pyo
1293
0644
edit
dl
rm
pong-demo-1.py
1549
0644
edit
dl
rm
pong-demo-1.pyc
2134
0644
edit
dl
rm
pong-demo-1.pyo
2134
0644
edit
dl
rm
printing-coords-of-items.py
2400
0644
edit
dl
rm
printing-coords-of-items.pyc
2584
0644
edit
dl
rm
printing-coords-of-items.pyo
2584
0644
edit
dl
rm
radiobutton-simple.py
2011
0644
edit
dl
rm
radiobutton-simple.pyc
1864
0644
edit
dl
rm
radiobutton-simple.pyo
1864
0644
edit
dl
rm
README
513
0644
edit
dl
rm
rubber-band-box-demo-1.py
2134
0644
edit
dl
rm
rubber-band-box-demo-1.pyc
2572
0644
edit
dl
rm
rubber-band-box-demo-1.pyo
2572
0644
edit
dl
rm
rubber-line-demo-1.py
1919
0644
edit
dl
rm
rubber-line-demo-1.pyc
2276
0644
edit
dl
rm
rubber-line-demo-1.pyo
2276
0644
edit
dl
rm
slider-demo-1.py
1000
0644
edit
dl
rm
slider-demo-1.pyc
1712
0644
edit
dl
rm
slider-demo-1.pyo
1712
0644
edit
dl
rm
subclass-existing-widgets.py
677
0644
edit
dl
rm
subclass-existing-widgets.pyc
1234
0644
edit
dl
rm
subclass-existing-widgets.pyo
1234
0644
edit
dl
rm
two-radio-groups.py
3758
0644
edit
dl
rm
two-radio-groups.pyc
2192
0644
edit
dl
rm
two-radio-groups.pyo
2192
0644
edit
dl
rm
window-creation-more.py
1020
0644
edit
dl
rm
window-creation-more.pyc
1719
0644
edit
dl
rm
window-creation-more.pyo
1719
0644
edit
dl
rm
window-creation-simple.py
815
0644
edit
dl
rm
window-creation-simple.pyc
1642
0644
edit
dl
rm
window-creation-simple.pyo
1642
0644
edit
dl
rm
window-creation-w-location.py
1325
0644
edit
dl
rm
window-creation-w-location.pyc
2104
0644
edit
dl
rm
window-creation-w-location.pyo
2104
0644
edit
dl
rm
Edit:
/usr/lib64/python2.6/Demo/tkinter/matt/canvas-reading-tag-info.py
(1678B)
from Tkinter import * class Test(Frame): def printit(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.drawing = Canvas(self, width="5i", height="5i") # make a shape pgon = self.drawing.create_polygon( 10, 10, 110, 10, 110, 110, 10 , 110, fill="red", tags=("weee", "foo", "groo")) # this is how you query an object for its attributes # config options FOR CANVAS ITEMS always come back in tuples of length 5. # 0 attribute name # 1 BLANK # 2 BLANK # 3 default value # 4 current value # the blank spots are for consistency with the config command that # is used for widgets. (remember, this is for ITEMS drawn # on a canvas widget, not widgets) option_value = self.drawing.itemconfig(pgon, "stipple") print "pgon's current stipple value is -->", option_value[4], "<--" option_value = self.drawing.itemconfig(pgon, "fill") print "pgon's current fill value is -->", option_value[4], "<--" print " when he is usually colored -->", option_value[3], "<--" ## here we print out all the tags associated with this object option_value = self.drawing.itemconfig(pgon, "tags") print "pgon's tags are", option_value[4] self.drawing.pack(side=LEFT) def __init__(self, master=None): Frame.__init__(self, master) Pack.config(self) self.createWidgets() test = Test() test.mainloop()
Save
cmd:
run