A Virtual-ListControl is sufficient for almost any purpose,
since anything it will render will be triggered from the outside,
in appropriate OwnerDraw-Events - which will then visualize
Data which is hosted outside of the Control as well.
This allows for quite some flexibility, even when one tries
to implement a TreeList-scenario on just such a simple "VList".
The VList-Control which comes with this Demo is (codewise) quite
small (about 350 lines of code) - and based on a normal ListBox-
WindowClass (and not a ListView).
Nevertheless, it:
- is Unicode-aware
- has no dependencies to other COM-libs
- supports OwnerDrawn-Headers
- supports multiple Columns (including HScrolling if needed)
- supports Sorting (including SortMarker-Rendering on the Col-Headers)
- encapsulates already the Basic-GDI-routines (no GDI-Declares needed at the outside)
- when used in conjunction with cGDIPlusCache can render Icons and Png-Content in each Cell
So, all in all a good wireframe to start developing your own (relative lightweight)
GridControl around it.
Here's a ScreenShot, what the Demo will produce "TreeList-wise":
![]()
In the above Picture, "Group 2" is in collapsed state - and please note
the formatted and right-aligned output in the last Column, which is
currently in "Sorted-Ascending"-state (ensured by a HeaderClick).
This sorting is ensured over the outside DataContainer (a normal ADO-Recordset),
and works (due to the Data-arrangement within that Recordset) "below the Group-Level"
(inside the Group-Nodes).
Here's the Demo-Zip: VList_GroupDemo_Classic.zip
(please use the VB-ProjectGroup-File: "_TestGroup.vbg" -
as long as you don't want to compile the VList.ocx into a binary first).
Have fun!
Olaf
since anything it will render will be triggered from the outside,
in appropriate OwnerDraw-Events - which will then visualize
Data which is hosted outside of the Control as well.
This allows for quite some flexibility, even when one tries
to implement a TreeList-scenario on just such a simple "VList".
The VList-Control which comes with this Demo is (codewise) quite
small (about 350 lines of code) - and based on a normal ListBox-
WindowClass (and not a ListView).
Nevertheless, it:
- is Unicode-aware
- has no dependencies to other COM-libs
- supports OwnerDrawn-Headers
- supports multiple Columns (including HScrolling if needed)
- supports Sorting (including SortMarker-Rendering on the Col-Headers)
- encapsulates already the Basic-GDI-routines (no GDI-Declares needed at the outside)
- when used in conjunction with cGDIPlusCache can render Icons and Png-Content in each Cell
So, all in all a good wireframe to start developing your own (relative lightweight)
GridControl around it.
Here's a ScreenShot, what the Demo will produce "TreeList-wise":

In the above Picture, "Group 2" is in collapsed state - and please note
the formatted and right-aligned output in the last Column, which is
currently in "Sorted-Ascending"-state (ensured by a HeaderClick).
This sorting is ensured over the outside DataContainer (a normal ADO-Recordset),
and works (due to the Data-arrangement within that Recordset) "below the Group-Level"
(inside the Group-Nodes).
Here's the Demo-Zip: VList_GroupDemo_Classic.zip
(please use the VB-ProjectGroup-File: "_TestGroup.vbg" -
as long as you don't want to compile the VList.ocx into a binary first).
Have fun!
Olaf