Tengo un widget Tkinter Canvas (Python 2.7, no 3), y en este lienzo tengo diferentes elementos. Si creo un nuevo elemento que se superpone a un elemento anterior, estará al frente. ¿Cómo puedo mover el objeto anterior frente al recién creado, o incluso delante de todos los demás elementos del lienzo?Lienzo de Tkinter mover elemento al nivel superior
Código de ejemplo hasta el momento:
from Tkinter import *
root = Tk()
canvas = Canvas(root,width=200,height=200,bg="white")
canvas.grid()
firstRect = canvas.create_rectangle(0,0,10,10,fill="red")
secondRect = canvas.create_rectangle(5,5,15,15,fill="blue")
ahora quiero firstRect a estar frente a secondRect.
¿Eso lo eleva por un nivel o al frente? –
@ PeterKramer: al frente, creo. Aquí está el [enlace] (http://effbot.org/tkinterbook/canvas.htm#Tkinter.Canvas.tag_lower-method) –