How to do it...

Let's see how to perform this recipe:

  1. We will first create a GUI using tkinter in a procedural fashion and then we will add a class to it to display tooltips over GUI widgets.
  2. Next, we will create a new module: GUI_FallDown.py.
  3. Add the following code:
#====================== # imports #====================== import tkinter as tk from tkinter import ttk from tkinter import messagebox #====================== # Create instance #====================== win = tk.Tk()    #====================== # Add a title        #======================  win.title("Python GUI") #========================= # Disable resizing the GUI #========================= win.resizable(0,0) 
  1. Next, add some widgets:
#============================================================= ...

Get Python GUI Programming Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.