[wxPython-users] Appearance of ListCtrl using Vista

Andrea Gavana andrea.gavana at gmail.com
Tue Jan 30 08:50:12 PST 2007


Hi David,

> For the cases where space is limited, I'm thinking of implementing the
> functionality of a ListCtrl, including a virtual control, using a read-only
> wx.Grid, which would permit more control over its appearance. Does this
> sound a sensible way to go? I suppose the alternative would be a generic,
> owner-drawn ListCtrl, but I don't know quite what that would involve - is it
> even feasible ( -- Andrea?)?

I already have a complete implementation of an owner-drawn wxListCtrl,
taken and traslated directly from the generic wxListCtrl. At present
state, it has the same feature of wxListCtrl but it is completely
owner-drawn. It can also run the wxPython wxListCtrl demo.
At the beginning of the translation process from C++ to Python, I
wanted to enhance the control in order to handle variable-height rows,
and the possibility to add any kind of widgets inside every "cell" of
wxListCtrl. To make it behave like CustomTreeCtrl does right now.
Unfortunately, the second wish (every kind of widget attached to a
wxListCtrl "cell") *requires* the first wish (variable-height rows).
And more unfortunately (if this is even possible), there is NO way to
handle that. Some will probably suggest wxVScrolledWindow: it is not
enough, I also need variable-width columns.
For that reason I asked about wxHVScrolledWindow, implemented few
months ago in wxWidgets and promptly kicked away for some misterious
reasons.

So, it can be done in two ways: either you customize a grid as you
were thinking, or I (we) should find a way to make the owner-drawn
wxListCtrl work.

Just my 2c.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/




More information about the wxpython-users mailing list