TBaseVirtualTree.GetSortedSelection Method

Virtual Tree View

Returns a sorted list of all currently selected nodes.

Pascal
function GetSortedSelection(Resolve: Boolean): TNodeArray;
Description

Returns a list of selected nodes sorted in logical order, that is, as they appear in the tree. If Resolve is true then nodes which are children of other selected nodes are not put into the new array. This feature is in particuar important when doing drag'n drop as in this case all selected node plus their children need to be considered. A selected node which is child (grand child etc.) of another selected node is then automatically included and doesn't need to be explicitely mentioned in the returned selection array.

Notes

The caller is responsible for freeing the array. Allocation is done here. Usually, though, freeing the array doesn't need 

additional attention as it is automatically freed by Delphi when it gets out of scope.

Class
Links
What do you think about this topic? Send feedback!