TLazVirtualStringTree.Items lazarus / 31-LCL ---------------------------------------------------------------------- egsuh · 2025-08-06 10:03 There is items property for TTreeview, i.e. I can write     TreeNode := TreeView.Items[ti];  Is there a similar property for TLazVirtualStringTree? ---------------------------------------------------------------------- wp · 2025-08-06 10:14 AFAIK, the VirtualTree does not have an Items[] list. You only can iterate over the nodes by methods such as GetNextSibling, GetPrevSibling, GetFirstChild, GetLastChild etc. The normal TTreeView has similar methods as well (accessible from the Items property), and using them is usually preferred over the slower the array-like Items[] property. ---------------------------------------------------------------------- egsuh · 2025-08-06 14:50 Actually iterating the nodes of tree structure is not a difficulty. Following algorithm does all. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i type    TProcTNOperate = procedure (X: TTreeNode) is nested;  implementation  procedure IterateTreeNodes (Node: TTreeNode; procOperationOnTreeNode: TProcTNOperate);begin    if Node = nil then Exit;     procOperationOnTreeNode(node);     IterateTreeNode(Node.getFirstChild);     IterateTreeNode(Node.GetNextSibling); end;   begin    IterateTreeNodes(Treeview.GetFirstChild); end.   Simply wondering devising this kine of algorithm deserves the effort, when there is more straightforward way like:   for ti := 0 to treeview.items.count -1 do procOperateOnTreeNode(treeview.items[ti]);