Tkinter Part - 15 | Introduction to canvas and blue rectangle in Tkinter python with example | MUST WATCH
CODE:
import tkinter as tk
root = tk.Tk()
root.title("Blue Rectangle")
Create a Canvas widget
canvas = tk.Canvas(root, width=300, height=200, bg="white")
canvas.pack()
Draw a blue rectangle on the Canvas
rectangle = canvas.create_rectangle(50, 50, 250, 150, fill="blue")
Start the Tkinter event loop
root.mainloop()
🎓 Subscribe & Stay Tuned:
👍 Like, Share, and Comment:
🔗 Connect with us:
GUI Playlist: • Building GUI Applications with Tkinter | S...
Python Playlist : • Python Programming Essentials | Study2Shar...
Visit My YouTube channel : https://www.youtube.com/ @Study2Share
Thank you for watching.
-----------------------------------------------------------
Like - Share - Comment - Subscribe.
------------------------------------------------------------
#python #programming #GUI #Tkinter #canvas #pythonprogramming #pythontutorial #pythonbasics #pythondatatypes #pythonforbeginners #pythonbeginner #python3 #pythonadvanced #python #pythonexamples #pythonexercises #programming #programmingpython #pythondevelopers #pythondevelopment #pythondeveloper #pythonseries #pythonmastery #pythonmodule #pythonfunction #pythonmethods #pythondictionary #pythonkey #pythonvalue #pythoncoder #pythoncode #top10 #study2share #studytwoshare #studyshare #study #share #pratik #shah