3

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.

ben
  • 665
  • 4
  • 10
  • 16

1 Answers1

3
canvas.tag_raise(item)

at least I think ...

Joran Beasley
  • 110,522
  • 12
  • 160
  • 179