|
|
TreeListView control
TreeView control with
ListView capabilities.
It looks like a tree, but has column headers and displays tree sub-items.
The control is partly implemented from a MFC CTreeListView control by Gerolf Kühnel available at the Codeproject site. As a bonus I have added sub-item images, text coloring, font formatting and header drag'n'drop support.
To use it, place a regular
In the OnInitDialog() event handler, add the following line:
The control is built from a standard Windows
you have the full power of the standard tree and header controls.
From there you can add your column headers...
and tree items...
and finally change the sub-item properties...
Sub-items can also be added/changed using the SetSubItem()
method. It uses its own TLVITEM item-structure, which works
the same way as the ones in the original tree and list controls.
You still need to set the images and indent using the embedded tree
control to modify data in column 0,
while the caption of items in column 0 (and all other columns) should be changed using
the
You can change font and colours for each item.. Use the
It is wise to add the Source Code DependenciesInternet Explorer 5 or betterMicrosoft Visual C++ 6.0 Microsoft WTL 3.1 Library Download Files
Written by Bjarke Viksoe. Article submitted 6/7/2001. To the top
|
|||