diff --git a/projet_tkinter_sujet5.py b/projet_tkinter_sujet5.py index 822ddc9..27f93cd 100644 --- a/projet_tkinter_sujet5.py +++ b/projet_tkinter_sujet5.py @@ -12,6 +12,6 @@ fenetre = tk.Tk() canva = tk.Canvas(fenetre, width = 400, height = 300, bg = "white") canva.grid() -rectangle = tk.Rectangle(fenetre, position_x, position_y, position_x+taille, position_y+taille) +rectangle = canva.create_rectangle(position_x, position_y, position_x+taille, position_y+taille) fenetre.mainloop() \ No newline at end of file