wxPython

wxPython: Putting a Background Image on a Panel

Yesterday, I received a request to create a GUI with Tkinter or wxPython that had an image for the background with buttons on top. After looking at Tkinter, I discovered that it’s PhotoImage widget only supported two formats: gif and pgm (unless I installed the Python Imaging Library). Because of this, I decided to give

wxPython: Putting a Background Image on a Panel Read More »

The “Book” Controls of wxPython (Part 1 of 2)

If you’re new to GUI programming (and wxPython in particular), you may not know what a “book” control is. It may be that other languages call this control something different too. In wxPython, a book control allows the user to switch between various panels. The most common examples are browsers and system option dialogs with

The “Book” Controls of wxPython (Part 1 of 2) Read More »

wxPython – Redirecting stdout / stderr

New programmers start using Python and wxPython each week. So it follows that every few months, I see people asking how to redirect stdout to a wx.TextCtrl on comp.lang.python or the wxPython mailing list. Since this is such a common question, I thought I would write an article about it. Regular readers will know that

wxPython – Redirecting stdout / stderr Read More »

wxPython Sizers Tutorial: Using a GridBagSizer

In this tutorial, I will take my code from the GridSizer tutorial I wrote the other day and heavily modify it to display oddly shaped widgets in a GridBagSizer. The GridBagSizer is the most complex of the sizers. It subclasses the FlexGridSizer, so you can use all of it’s parent’s methods as well as those

wxPython Sizers Tutorial: Using a GridBagSizer Read More »