December 2021
Intermediate to advanced
352 pages
10h
English
You can make very nice visual interfaces using the tkinter toolkit provided with Python. It gives you tools for creating windows, buttons, radio buttons, check boxes, entry fields, list boxes, combo boxes and a number of other useful visual widgets.
To use the tkinter library, you must tell your program to import those tools:
import tkinter as tk from tkinter import *
Then you set up the window like this:
# set up the window root = tk.Tk() # get the window
You create a Hello button with:
# create Hello button
slogan = Button(root,
text="Hello",
command=disp_slogan)
Then you put in the layout:
slogan.pack()
The command argument refers to the function ...
Read now
Unlock full access