Stukk is a fork of CustomTkinter, a modern UI library for Python’s Tkinter. This project continues to offer fully customizable, modern widgets with light/dark theme support and HighDPI scaling.
Stukk introduces improvements, bug fixes, and a modernized configuration with focus on maintainability and ongoing development.
For details on changes and improvements introduced in this fork, please refer to the CHANGELOG.
pip install stukk
The package installs as
stukk
, but you still import it as:
import customtkinter
To set up the development environment, follow the instructions in project-setup.md.
- Additional bug fixes inherited from the original project.
- Introduction of new features and enhancements.
You can refer to the official CustomTkinter documentation, since Stukk is currently API-compatible.
import customtkinter
customtkinter.set_appearance_mode("System") # system (default), light, dark
customtkinter.set_default_color_theme("blue") # blue (default), dark-blue, green
app = customtkinter.CTk()
app.geometry("400x240")
def button_function():
print("button pressed")
button = customtkinter.CTkButton(master=app, text="CTkButton", command=button_function)
button.place(relx=0.5, rely=0.5, anchor=customtkinter.CENTER)
app.mainloop()
The following images and videos are from the original project and still apply to Stukk.
CustomTkinter can adapt to the Windows 10/11 light or dark mode:
complex_example_mode_switch_Windows.mp4
| complex_example.py
on Windows 11 with system appearance mode change and standard 'blue' theme
On macOS you either need python3.10 or higher or the anaconda python version to get a dark window header (Tcl/Tk >= 8.6.9 required):
complex_example_mode_switch_scaling_macOS.mp4
| complex_example.py
on macOS with system appearance mode change, user-scaling change and standard 'blue' theme
It's possible to put an image on a CTkButton. You just have to
pass a PhotoImage object to the CTkButton with the image
argument.
If you want no text at all you have to set text=""
or you specify
how to position the text and image at once with the compound
option:
|
image_example.py
on Windows 11
Scrollable frames are possible in vertical or horizontal orientation and can be combined
with any other widgets.
|
scrollable_frame_example.py
on Windows 11
In the following example I used a TkinterMapView which integrates well with a CustomTkinter program. It's a tile based map widget which displays OpenStreetMap or other tile based maps:
tkintermapview_customtkinter_Windows.mp4
| examples/map_with_customtkinter.py
from TkinterMapView repository on Windows 11
You can find the TkinterMapView library and example program here: https://github.com/TomSchimansky/TkinterMapView
This project is a fork of Tom Schimansky / CustomTkinter. All original credits go to him. Stukk aims to maintain and improve the library as the community evolves.
Stukk is maintained by WipoDev. Want to contribute? Suggestions and PRs are welcome!