"Kent Johnson" <ken...@tds.net> wrote
for i in range(numboxes):
box[i]=w.create_rectangle((1+i)*40, 40, (2+i)*40, height-40,
fill="blue")
w.tag_bind(box[i], '<Enter>', lambda e, i=i: enter(e, i))
w.tag_bind(box[i], '<Leave>', lambda e, i=i: leave(e, i))
I'm wrong again. I've never noticed tag_bind() before.
Although on investigation it is used by Grayson in his Tkinter book...
I notice it can also be used in the Text widget to catch events on
specific items of text or embedded images etc.
Nice.
Alan G
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor