Forum > General

How to loop through selected nodes in Virtual TreeView

(1/1)

M[a]nny:
Hey guys, I'm trying to understand how to work with selected nodes in Virtual TreeView. I've found function called SelectedNodes:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---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.

avk:
Maybe

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---var  Node: PVirtualNode;...  for Node in MyVirtualStringTree.SelectedNodes() do    ... 

M[a]nny:
Thank you very much, it works.

Navigation

[0] Message Index

Go to full version