Thanks for looking into this.
I'm still using Delphi 7. Not going to move to BDS for some time.
But what is the problem with virtual tree?
I seem to remember that they used Mike Lischkes virtual string tree (
http://www.lischke-online.de/VirtualTreeview/) in many places (project manager, structure pane, message view, refactoring window).
I'm somewhat familiar with the component. TBaseVirtualTree.GetSortedSelection will return all selected nodes.
It returns a TNodeArray.
TNodeArray = array of PVirtualNode;
PVirtualNode = ^TVirtualNode;
TVirtualNode = packed record
Index, // index of node with regard to its parent
ChildCount: Cardinal; // number of child nodes
NodeHeight: Word; // height in pixels
States: TVirtualNodeStates; // states describing various properties of the node (expanded, initialized etc.)
Align: Byte; // line/button alignment
CheckState: TCheckState; // indicates the current check state (e.g. checked, pressed etc.)
CheckType: TCheckType; // indicates which check type shall be used for this node
Dummy: Byte; // dummy value to fill DWORD boundary
TotalCount, // sum of this node, all of its child nodes and their child nodes etc.
TotalHeight: Cardinal; // height in pixels this node covers on screen including the height of all of its
// children
// Note: Some copy routines require that all pointers (as well as the data area) in a node are
// located at the end of the node! Hence if you want to add new member fields (except pointers to internal
// data) then put them before field Parent.
Parent, // reference to the node's parent (for the root this contains the treeview)
PrevSibling, // link to the node's previous sibling or nil if it is the first node
NextSibling, // link to the node's next sibling or nil if it is the last node
FirstChild, // link to the node's first child...
LastChild: PVirtualNode; // link to the node's last child...
Data: record end; // this is a placeholder, each node gets extra data determined by NodeDataSize
end;
Hope that helps!