[wxPython] Bug in wxListCtrl

I think I have found a bug in wxWindows but as I am new to the code I'd like someone else's opinion on the matter first before spouting off.... :slight_smile:

I believe this bug was introduced in wxWindows 2.3.2 as the code did work in 2.3.1.

Create a list control in report mode with some columns (one is the simplest, obviously) and note that the headers are found within the client area for the list control, thus removing from sight the first couple of items in the list! The "hack" or "workaround" for this is to create an OnSize event which simply sets the dimensions to the dimensions already chosen in the constructor (which is similar to what the demo does). I took a look at the C++ code and it looks like the constructor does not allow for the presence of headers, but the resize logic does! I'd take a stab at supplying a patch but my build of wxPython does not import correctly (ImportError: /usr/lib/python2.1/site-packages/wxPython/wxc.so: undefined symbol: wxEntryStart__FiPPc) so I couldn't really test it myself. Still, I can point to the lines of code that need to be changed, if desired.

If someone wants a brief example of the bug, send me an e-mail.

Anthony Tuininga

I believe this bug was introduced in wxWindows 2.3.2 as the code did
work in 2.3.1.

That is possible since there were some cases of redundant size events that
were fixed.

Create a list control in report mode with some columns (one is the
simplest, obviously) and note that the headers are found within the
client area for the list control, thus removing from sight the first
couple of items in the list! The "hack" or "workaround" for this is to
create an OnSize event which simply sets the dimensions to the
dimensions already chosen in the constructor (which is similar to what
the demo does).

Which was just a lucky coincidence I think as that size event handler is
there for a different purpose.

I took a look at the C++ code and it looks like the
constructor does not allow for the presence of headers, but the resize
logic does! I'd take a stab at supplying a patch but my build of
wxPython does not import correctly (ImportError:
/usr/lib/python2.1/site-packages/wxPython/wxc.so: undefined symbol:
wxEntryStart__FiPPc) so I couldn't really test it myself. Still, I can
point to the lines of code that need to be changed, if desired.

Please enter a bug report about it, including what you think should be
changed in the C++ code.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!