Posts

Showing posts from January, 2026

Python GUI Tkinter

Image
  Ø Introduction Tkinter is Python’s built-in GUI library It is used to create desktop applications It works on Windows, Linux, and macOS Ø 2. Importing Tkinter Tkinter is imported using import tkinter as tk No external installation is required Tkinter comes with standard Python Ø Main Window The main window is created using tk.Tk() It is usually stored in a variable named root All widgets are placed inside this window Ø Window Properties The window title is set using root.title() Window size is set using root.geometry() Geometry uses width × height format Ø Widgets Widgets are GUI components The label widget displays text The button widget performs actions Ø User Input The entry widget is used for input User data is read using.  get() Entry widgets are common in forms Ø Layout Management Widgets must be placed on the wind...