How to build amazing GUI’s with Python

Manpreet Singh
2 min readJul 29, 2021

Welcome back! As some of you may know, Python is an amazing language with tons of uses, one of these features is the ability of building out front-end software (GUI’s) for your projects, so let’s talk about another method on developing beautiful GUI’s with Python! Now, this specific method is going to use the very popular TkInter package + a theme package hosted on GitHub, here is a link to the theme package via GitHub:

Starting off, the main advantage of using this theme is that the developer actually implemented a modern style, very similar to Windows 11 (as mentioned by the original author). The original author also showcased how easy it is to implement this specific theme to your TkInter project, here is some sample code showing this process (showcased via their GitHub page):

import tkinter as tk
from tkinter import ttk

root = tk.Tk()

# Pack a big frame so, it behaves like the window background
big_frame = ttk.Frame(root)
big_frame.pack(fill="both", expand=True)

# Set the initial theme
root.tk.call("source", "sun-valley.tcl")
root.tk.call("set_theme", "light")

def change_theme()…

--

--

Manpreet Singh
Manpreet Singh

Responses (4)