Skip to content

05 · GUI

Build graphical user interfaces (windows with buttons, text boxes, menus) using Python.

What you'll learn

  • Tkinter — Python's built-in GUI toolkit. No extra install.
  • Widgets (reusable UI pieces) — Label, Button, Entry, Text, Listbox, Frame, Canvas.
  • Layout managers — how widgets are positioned: pack(), grid(), place().
  • Event-driven programming — your code reacts to button clicks, key presses, mouse moves.
  • Dialogs — message boxes, file pickers, color pickers.
  • Wiring the GUI to logic (often classes from module 02 or data from module 04).

Plain-language analogy

The window is a stage. Widgets are the actors. The layout manager is the stage director placing everyone. Event handling is the actors waiting for their cues (user clicks) to speak their lines.

Beyond Tkinter

When you need something richer: PyQt / PySide (professional, large apps), Kivy (touch / mobile), customtkinter (modern-looking Tk). Start with Tk; graduate later.

Source code

courses/python-course/05 - GUI/