Answer the question
In order to leave comments, you need to log in
How to change canvas coordinates in python tkinter using itemconfig?
How to change canvas coordinates in python tkinter using itemconfig?
my code:
from tkinter import *
def new_size(canvas, size, my_object):
canvas.itemconfig(my_object, 10, 10, 90, 90)
if __name__ == '__main__':
root = Tk()
canvas = Canvas(root, width=500, height=500)
canvas.grid()
red = canvas.create_rectangle(20, 20, 100, 100)
new_size(canvas, 0, red)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question