[wxPython-users] ANN: ColumnSizer mixin for ListCtrl
Rob McMullen
rob.mcmullen at gmail.com
Fri Jan 4 07:39:59 PST 2008
On Jan 4, 2008 6:00 AM, Mark Erbaugh <mark at microenh.com> wrote:
>
> On Thu, 2008-01-03 at 17:30 -0800, Rob McMullen wrote:
> > Here's a mixin for ListCtrl controls in LC_REPORT mode to help set the
> > initial size (and resize on list size events) of all columns.
>
> I must not understand this Mixin. I ran the demo and got a horizontal
> scrollbar for the list. I removed columns 5 (URL) and 6 (owner) from
> the demo and still got a horizontal scrollbar.
>
> I'm running wxPythin 2.7.8.1, Python 2.5.1 under Ubuntu 7.10 (Gutsy)
Yes, I see that as well when I remove columns 5 and 6. If you remove
the "scale=False" from column 2 it performs better except that it
doesn't take into account the vertical scrollbar. On windows removing
col 5 and 6 shows no scrollbar. Looks like I'll have to come up with
some GTK specific code to check for presence or absence of the
scrollbar.
(scale=False makes column 2 greedy. Column 2 is resized to its
preferred width based on its constraints. Perhaps I should rename
that attribute "greedy" to more aptly describe its function.)
Rob
More information about the wxpython-users
mailing list