Recent

Author Topic: How to loop through selected nodes in Virtual TreeView  (Read 2203 times)

M[a]nny

  • Full Member
  • ***
  • Posts: 130
  • Dreamer
How to loop through selected nodes in Virtual TreeView
« 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.
Bad news: Time flies.
Good news: You are the pilot.

Don't try to be perfect, just be unique.

avk

  • Hero Member
  • *****
  • Posts: 752
Re: How to loop through selected nodes in Virtual TreeView
« Reply #1 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.  

M[a]nny

  • Full Member
  • ***
  • Posts: 130
  • Dreamer
Re: How to loop through selected nodes in Virtual TreeView
« Reply #2 on: October 26, 2021, 11:25:37 pm »
Thank you very much, it works.
Bad news: Time flies.
Good news: You are the pilot.

Don't try to be perfect, just be unique.

 

TinyPortal © 2005-2018