I don\'t know if this question has duplicates , but i haven\'t found one yet.
when using python you can create GUI fastly , but sometimes you cannot find a method to
You can use Canvas.itemconfig:
item = K.create_rectangle(x1,y1,x2,y2,options...)
K.itemconfig(item,options)
To move the item, you can use Canvas.move
import Tkinter as tk
root = tk.Tk()
canvas = tk.Canvas(root)
canvas.pack()
item = canvas.create_rectangle(50, 25, 150, 75, fill="blue")
def callback():
canvas.itemconfig(item,fill='red')
button = tk.Button(root,text='Push me!',command=callback)
button.pack()
root.mainloop()
I searched around and found the perfect Tkinter method for resizing. canvas.coords() does the trick. just feed it your new coordinates and it's "good to go". Python 3.4
PS. don't forget the first param is the id.