📜  tkinter canvas remove - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:59.928000             🧑  作者: Mango

代码示例1
from Tkinter import *


a = Tk()

canvas = Canvas(a, width = 500, height = 500)
canvas.pack()

myrect = canvas.create_rectangle(0,0,100,100)
canvas.delete(myrect) #Deletes the rectangle