Draw rectangle with filled color : Rectangle « 2D « Python






Draw rectangle with filled color

Draw rectangle with filled color
from Tkinter import *

canvas = Canvas(width=300, height=300, bg='white')
canvas.pack(expand=YES, fill=BOTH)                

canvas.create_rectangle(20, 20, 300, 300, width=5, fill='red')

mainloop()

           
       








Related examples in the same category

1.Draw RectangleDraw Rectangle