Tkinter Introduction
Explore the fundamentals of Tkinter, Python's bundled GUI toolkit, to create and manage graphical user interfaces. Understand how to use widgets like buttons and menus, work with message and dialog boxes, and handle file selections. This lesson equips you to start building interactive Python GUI programs controlled by user actions.
We'll cover the following...
Introduction to Tkinter
There are several GUI (Graphical User Interface, pronounced “gooey”) systems that can be used with Python. Here, we’ll mainly focus on Tkinter, which comes bundled with the standard Python distribution.
Tkinter is the standard GUI library that comes preinstalled with Python and provides a very simple and easy to use interface that allows users to create GUI applications. It has a wide collection of widgets, including buttons, menus and textfields, each of which can help users create and build GUI elements.
Dialogs in Tkinter
Many programs do not require a full GUI, just a dialog box or two. Tkinter provides a number of these. To use them, import messagebox, simpledialog, and/or filedialog from Tkinter.
Message boxes
Message boxes are used to display messages along with a title using Tkinter’s messagebox dialog box. The following includes a list of messagebox types: ...