The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
Building Modern, Native-Looking Graphical User Interfaces in Python
CustomTkinter is a powerful Python UI library that delivers modern, fully customizable widgets with a consistent look across Windows, macOS, and Linux. This book is a hands-on guide that walks you through everything—from your first window to advanced techniques.
Minimum price
$15.00
$25.00
About the Book
CustomTkinter modernizes Tkinter, giving you beautiful, customizable widgets and a consistent look across all platforms. This book is your fast track to mastering it—from the basics of the Geometry Manager and event handling to advanced topics like custom JSON themes, composite widgets, and multi-window navigation. You'll also tackle multithreading, data integration, and matplotlib visualizations. If you want your Python apps to look modern and professional, this is the only guide you'll need.
---
Chapter 1: The Evolution of Desktop Interfaces in Python
1.1 Introduction to Graphical User Interfaces (GUIs) in Modern Software
1.2 The Tcl/Tk Heritage: Understanding the Underlying Engine of Python GUIs
1.3 What is CustomTkinter? Key Improvements over Standard Tkinter
1.4 Architecture and Rendering Mechanics of CustomTkinter
1.5 Comparing Python GUI Frameworks: CustomTkinter vs. PyQt/PySide vs. wxPython vs. Kivy
1.6 Setting Up the Development Environment
1.7 Hello, World! Creating Your Very First CustomTkinter Window
Chapter 2: Core Fundamentals and App Architecture
2.1 Anatomy of a CustomTkinter Application
2.2 The Main Event Loop: mainloop() and Execution Flow
2.3 Window Configuration and Lifecycle Management
2.4 Object-Oriented Programming (OOP) for GUI Design
2.5 Structuring Applications with Class-Based Patterns
2.6 High-DPI Scaling and Auto-Detection Across Platforms (Windows, macOS, Linux)
Chapter 3: Geometry Managers in Depth
3.1 Understanding Coordinate Systems and Container Heirarchies
3.2 The pack Geometry Manager: Rules, Anchor Points, and Expansion Strategies
3.3 Case Study: Building a Dual-List Item Management Tool with .pack()
3.4 The grid Geometry Manager: Mastering Columns, Rows, and Spanning
3.5 Weight Distribution and Responsive Window Resizing with grid_columnconfigure and grid_rowconfigure
3.6 Case Study: Building a GNOME Calculator Clone with .grid()
3.7 The place Geometry Manager: Absolute vs. Relative Positioning
3.8 Case Study: Building an Interactive Data Plotting Overlay with .place()
3.9 Common Layout Pitfalls and Anti-Patterns to Avoid
Chapter 4: Advanced Container Control and Structure
4.1 Organizing Widgets with CTkFrame
4.2 Creating Modular Application Views using Custom Frame Classes
4.3 Scrollable Interface Layouts with CTkScrollableFrame
4.4 Multi-Tab Interfaces using CTkTabview
4.5 Implementing Collapsible Panels and Accordion Interfaces
4.6 Designing Responsive Fluid Layouts for Variable Screen Sizes
Chapter 5: Input Components and Event Binding
5.1 Text Labels and Dynamic String Formatting with CTkLabel
5.2 Interactive Buttons: CTkButton States, Hover Effects, and Callbacks
5.3 Single-Line Text Input with CTkEntry and Validation Techniques
5.4 Multi-Line Text Handling and Formatting with CTkTextbox
5.5 Numeric Control: CTkSlider and CTkProgressBar
5.6 Boolean Controls: CTkCheckBox and CTkSwitch
5.7 Choice Controls: CTkRadioButton Groups, CTkOptionMenu, and CTkComboBox
5.8 Understanding Event Handling: Mouse, Keyboard, and Focus Events with .bind()
Chapter 6: Imagery, Custom Graphics, and Icons
6.1 Working with Images via Python Imaging Library (Pillow)
6.2 Displaying Scalable Images with CTkImage
6.3 Light and Dark Mode Image Auto-Switching
6.4 Integrating Vector Graphics (SVG) and Modern Icon Fonts
6.5 Vector Graphics and Custom Drawing with CTkCanvas
Chapter 7: Themes, Appearance Modes, and Color Palettes
7.1 The Color Architecture of CustomTkinter
7.2 Switching Between Light, Dark, and System Appearance Modes
7.3 Deep Dive into JSON Theme Files
7.4 Building a Custom Design System and Brand Theme
7.5 Dynamic Theme Switching at Runtime
7.6 Cross-Platform Font Rendering and Typography Choices
Chapter 8: Creating Custom Composite Widgets
8.1 Principles of Reusable Component Architecture
8.2 Building a Custom Date Picker Component
8.3 Constructing an Auto-Completing Search Bar
8.4 Designing a File/Folder Dropzone Widget
8.5 Packaging and Distributing Reusable Custom Components
Chapter 9: Windows, Modals, and Notifications
9.1 Managing Multiple Top-Level Windows with CTkToplevel
9.2 Building Custom Dialog Boxes and Confirmation Alerts
9.3 Custom Input Dialogs using CTkInputDialog
9.4 Interacting with the OS File System via Native File Dialogs
9.5 Designing Non-Intrusive Toast Notifications and Status Badges
9.6 Handling Application Exit and Cleanup Gracefully
Chapter 10: Asynchronous Programming and Multi-Threading
10.1 The Problem with Long-Running Tasks and UI Freezing
10.2 Integrating Python's threading Module with CustomTkinter
10.3 Thread-Safe Communication using queue.Queue
10.4 Utilizing asyncio inside CustomTkinter Applications
10.5 Implementing Real-Time Progress Bars for Background Tasks
Chapter 11: Data Visualization and Database Integration
11.1 Connecting CustomTkinter to Databases (SQLite / PostgreSQL)
11.2 Implementing Data Grids, Tables, and Pagination
11.3 Embedding Interactive Matplotlib Charts inside CTkFrame
11.4 Real-Time Data Streaming and Graph Updates
11.5 Exporting Application Data to CSV, JSON, and PDF Reports
About the Author
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
Learn more about writing on Leanpub
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.