[wxPython-users] Appearance of ListCtrl using Vista
Robin Dunn
robin at alldunn.com
Tue Jan 30 12:16:46 PST 2007
Andrea Gavana wrote:
> 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.
IIRC it was because it duplicated most of the code from
wxVScrolledWindow instead of refactoring and sharing as much as possible
between the two classes. The original author was going to come back
with a new patch but never did. IMO it would also make sense to just
add variable sized horizontal scrolling to wxVScrolledWindow and make
the V stand for Variable instead of Vertical.
>
> 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.
Have you given any thought to implementing a Python version of
wxVScrolledWindow + horizontal scrolling?
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list