[wxPython-users] ANN: ColumnSizer mixin for ListCtrl
Rob McMullen
rob.mcmullen at gmail.com
Fri Jan 18 13:19:18 PST 2008
On Jan 17, 2008 6:22 PM, Saint Germain <saintger at gmail.com> wrote:
> Sorry for this late feedback.
> I've tried it with the default virtual ListCtrl included in wxPython
> and it seems that it works when the window is shrinked but not if it
> is expanded (example in attachment).
It seems like the mixin is getting the wrong size for the preferred
width of the columns.
Because it's a virtual list, that must somehow affect the call to
SetColumnWidth(col, wx.LIST_AUTOSIZE) by preventing it from looking at
all 1 million rows.
Different things happen on windows and GTK (both using 2.7.8.1): on
windows the call to SetColumnWIdth only looks at some small number of
rows (perhaps only the first). On GTK, it is always returning 80
pixels. I haven't looked at the C++ source to see what's going on.
I don't know what the best solution is -- take a random selection of
some subset of rows and use those rows to guess a preferred size?
Any ideas?
Rob
More information about the wxpython-users
mailing list