Several years ago, the readers of this blog asked me to take some of my articles and turn them into a cookbook on wxPython. I have finally decided to do just that. I am including over 50 recipes that I am currently editing to make them more consistent and updating them to be compatible with the latest versions of wxPython. I currently have nearly 300 pages of content!
To help fund the initial production of the book, I am doing a fun little Kickstarter campaign for the project. The money raised will be used for the unique perks offered in the campaign as well as various production costs related to the book, such as ISBN acquisition, artwork, software expenses, advertising, etc.
In case you don't know what wxPython is, the wxPython package is a popular toolkit for creating cross platform desktop user interfaces. It works on Windows, Mac and Linux with little to no modification of your code base.
The examples in my book will work with both wxPython 3.0.2 Classic as well as wxPython Phoenix, which is the bleeding edge of wxPython that supports Python 3. If I discover any recipes that do not work with Phoenix, they will be clearly marked or there will be an alternative example given that does work.
Here is a listing of the current set of recipes in no particular order:
- Adding / Removing Widgets Dynamically
- How to put a background image on a panel
- Binding Multiple Widgets to the Same Handler
- Catching Exceptions from Anywhere
- wxPython's Context Managers
- Converting wx.DateTime to Python datetime
- Creating an About Box
- How to Create a Login Dialog
- How to Create a "Dark Mode"
- Generating a Dialog from a Config File
- How to Disable a Wizard's Next Button
- How to Use Drag and Drop
- How to Drag and Drop a File From Your App to the OS
- How to Edit Your GUI Interactively Using reload()
- How to Embed an Image in the Title Bar
- Extracting XML from the RichTextCtrl
- How to Fade-in a Frame / Dialog
- How to Fire Multiple Event Handlers
- Making your Frame Maximize or Full Screen
- Using wx.Frame Styles
- Get the Event Name Instead of an Integer
- How to Get Children Widgets from a Sizer
- How to Use the Clipboard
- Catching Key and Char Events
- Learning How Focus Works in wxPython
- Making Your Text Flash
- Minimizing to System Tray
- Using ObjectListView instead of ListCtrl
- Making a Panel Self-Destruct
- How to Switch Between Panels
- wxPython: Using PyDispatcher instead of Pubsub
- Creating Graphs with PyPlot
- Redirect Python's Logging Module to a TextCtrl
- Redirecting stdout / stderr
- Resetting the Background Color
- Saving Data to a Config File
- How to Take a Screenshot of Your wxPython App and Print it
- Creating a Simple Notebook
- Ensuring Only One Instance Per Frame
- Storing Objects in ComboBox or ListBox Widgets
- Syncing Scrolling Between Two Grids
- Creating Taskbar Icons
- A wx.Timer Tutorial
- How to Update a Progress Bar from a Thread
- Updating Your Application with Esky
- Creating a URL Shortener
- Using Threads in wxPython
- How to Create a Grid in XRC
- An Introduction to XRC
 Note: Recipe names and order are subject to change