Can you change the attributes of a Canvas object after creation?

爷,独闯天下 提交于 2019-11-30 20:47:15

Yes you should be able to change settings of the canvas with config.

Likewise, use itemconfig to change items on the canvas. This does require that you save a handle to the item or tag them.

Example from tkinterbook:

i = w.create_line(xy, fill="red")

w.coords(i, new_xy) # change coordinates
w.itemconfig(i, fill="blue") # change color
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!