wxWindows stuff

Patch for wxListCtrl/generic (v. 2.3.3) to make wxLIST_FORMAT_* work

This is a really simple (and so probably not full-optimized) patch to make column alignment work also on the generic version of wxListCtrl. You can get it here. To apply it:

cd $PATH_TO_WXWIN
patch -p2 src/generic/listctrl.cpp <listctrl.cpp.diff

wxTreeListCtrl

This is my first effort to produce a multicolumn tree control (or, as the name says, a combination of a tree and a list control). The implementation is basically just a cut & paste of portions of src/generic/listctrl.cpp and src/generic/treectrl.cpp (with some minor modifications to make the whole thing work, of course ;-).

It is not derived from wxTreeCtrl (the main reason is that on wxMSW it would not have been possible - or at least I wouldn't have been able to do it), but the interface is virtually identical, with some new methods to handle columns in various ways.

The methods added are listed here, but please see the sources for the details.

There are also new overloaded versions of some methods (again, see the sources for the details):

Event handling

wxTreeListCtrl supports all the EVT_TREE_* events. In addition to those, it supports also the EVT_LIST_COL_* events, to get information about the columns behaviour.

Compiling

There's just one issue to address when compiling the sources: you have to edit the wx/treebase.h header file to add a friend declaration, otherwise the compilation will fail. In particular, you have to add the following line in the body of class wxTreeEvent (around line 260):
friend class wxTreeListMainWindow;

Screenshot

If you, like me, want to see how something works before dowloading it, here's a simple screenshot.

Download

You can get wxTreeListCtrl here. The archive contains a modified version of wxWindows' tree ctrl sample which shows how to use the widget.


Last modified: 2002-10-10 14.30