Lazarus

Programming => General => Topic started by: M[a]nny on October 26, 2021, 11:40:13 am

Title: How to loop through selected nodes in Virtual TreeView
Post by: M[a]nny on October 26, 2021, 11:40:13 am
Hey guys, I'm trying to understand how to work with selected nodes in Virtual TreeView. I've found function called SelectedNodes:
Code: Pascal  [Select][+][-]
  1. function SelectedNodes(ConsiderChildrenAbove: Boolean = False): TVTVirtualNodeEnumeration;
It returns TVTVirtualNodeEnumeration but i have no idea how to loop through this enum and get each value of the selected nodes.
Title: Re: How to loop through selected nodes in Virtual TreeView
Post by: avk on October 26, 2021, 01:39:17 pm
Maybe
Code: Pascal  [Select][+][-]
  1. var
  2.   Node: PVirtualNode;
  3. ...
  4.   for Node in MyVirtualStringTree.SelectedNodes() do
  5.     ...
  6.  
Title: Re: How to loop through selected nodes in Virtual TreeView
Post by: M[a]nny on October 26, 2021, 11:25:37 pm
Thank you very much, it works.
TinyPortal © 2005-2018