From the course: Python GUI Development with Tkinter
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Creating and configuring widgets
From the course: Python GUI Development with Tkinter
Creating and configuring widgets
- In a TK GUI Widgets are all of the things that you see on the screen. Widgets are the controls you use to interface with the program, like buttons and text entry fields. They're the visual containers used to organize those controls, like the application window and frames within it. Widgets can also be used to display information to the user, ranging from a simple text label to a complex graphic on a canvas. Each of these different types of widgets is defined as a class, within the Tkinter package. When you add a widget to your program with Tkinter you're creating an instance of that class, a Python object. That object will store all of the configuration settings for that specific instance. In TK all widgets in your program exist under a hierarchy with a single "Root" window at the very top. This means that whenever you create a new widget object in Tkinter you'll have to specify another widget as its parent in that hierarchy. You can make this hierarchy as deep as necessary for your…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.