The example in this recipe shows how we can define our own variations of the Tkinter objects to generate custom controls and dynamically construct a menu with them. We will also take a quick look at using threads, to allow other tasks to continue to function while a particular task is being executed.
To view the GUI display, you will need a monitor displaying the Raspberry Pi desktop or need to be connected to another computer running the X server.
To create a graphical Start menu application, create the following
#!/usr/bin/python3 # graphicmenu.py import tkinter as tk from subprocess import call import threading #Define applications ["Display name","command"] ...