[wxPython-users] can't get auto width correct for first column
in a wx.ListCtrl
Robin Dunn
robin at alldunn.com
Mon Mar 17 17:54:34 PDT 2008
Tim Black wrote:
> I have a simple custom ListCtrl to implement drawing common lists in my app. It
> uses wx.LIST_AUTOSIZE_USEHEADER by default to set up the column widths every
> time the list is updated. For some reason, when the list is updated, the first
> column width will never get set wide enough for the data contained in it. All
> the other columns seem to update OK. Also, if I change the first column header
> to a longer string, the auto-width calculation seems to work. The app is pasted
> below. Can anyone tell me what I'm doing wrong? Is this something that the new
> ColumnSizerMixin is supposed to address?
>
Assuming you are on Windows then I suspect that this is just another
example of MS's weirdness about the native ListView. There are some
other examples of things working differently with the first column than
the others. For example, you can't right or center justify the column
label text, if there is an image list then room is reserved in the first
column for the images even if you don't use them for the items, etc.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list