
![]() |
@wtf | |
Let’s bring Python to life with desktop apps using *Tkinter* — Python’s built-in GUI library! |
||
1
Replies
7
Views
1 Bookmarks
|
![]() |
@wtf | 2 days |
*What is Tkinter?* It’s used to create GUI apps with: *Buttons* *Labels* *Text Boxes* *Windows* *Basic Tkinter Code:* import tkinter as tk root = tk.Tk() root.title(My First GUI) root.geometry(300x200) label = tk.Label(root, text=Hello, Tkinter!) label.pack() root.mainloop() *What’s Happening?* - tk.Tk() → Creates the main window - Label() → Widget to display text - pack() → Places the widget - mainloop() → Keeps the window open *Popular Widgets:* *Label* – Display text *Button* – Trigger actions *Entry* – Text input (1 line) *Text* – Multi-line input *Frame* – Group widgets *Use Cases:* Calculators Data entry forms Small desktop tools Educational apps Tkinter is *perfect for quick tools & UIs*. No need for big frameworks when a simple GUI does the job. |
||


