Place a TAdvTreeView on your form. By default It is filled with sample data nodes in first and second level.
Add some nodes in third level. Add a button and add some code to expand the focused node recursive:
procedure TForm1.FormCreate(Sender: TObject);
begin
with AdvTreeView1 do begin
AddNode(Nodes[0].Nodes[0]).Text[0] := 'Node 1';
AddNode(Nodes[0].Nodes[0]).Text[0] := 'Node 2';
AddNode(Nodes[0].Nodes[0]).Text[0] := 'Node 3';
end;
end;
procedure TForm1.BtnExpandFocusedNodeClick(Sender: TObject);
begin
if Assigned(AdvTreeView1.FocusedNode) then
AdvTreeView1.ExpandNode(AdvTreeView1.FocusedNode,True); // Expand recursive
end;
Select the first node and click the button to expand the nodes. Nothing happens.
Now collapse the first node. Click the button to expand again. Now it works.
It seems that recursive expanding isn't executed if the level under the node is already expanded.