Category Archives: wxPython

wxPython List Control, Data Items, and Sorting

After adding the LC_SORT_ASCENDING style to a list control I started to see some odd behavior. Some items would not drag-n-drop while other drag-n-drops dropped the wrong item! This is what happend: Originally the list was unsorted. Since the data … Continue reading

Posted in Python, wxPython | Leave a comment

wxGlade generated classes

When generating code for a given class, wxGlade will generate code corresponding to the first time it sees a given class name. This can lead to basically empty classes if you define your application frame first and it incorporates an … Continue reading

Posted in wxPython | Leave a comment

Little Tip for Debugging wxPython Sizers

I was having trouble getting text to align correctly. Setting the background color of the item in question ( the label in this case ) to a different color than the dialog’s normal background helped identify the problem. I thought … Continue reading

Posted in Python, wxPython | 2 Comments

Resizing Windows in wxPython – How Embarrassing

Argh. I just realized today I had the *wrong* code posted in this example. The original post now contains the correct code.

Posted in Python, wxPython | Leave a comment

Resizing Windows in wxPython

I was having some trouble getting a window to resize when the contained controls were shown or hidden. After some searching and experimentation, I found this sequence to work:    def OnInit( self ):         self.res   = wxXmlResource( GUI_FILENAME )         self.frame … Continue reading

Posted in Python, wxPython | Leave a comment