I have set the the height of the FocusedNode
using following code
procedure TMainForm.SetheightClick(Sender: TObject);
begin
if Assigned(tree1.FocusedNode) then
Tree1.NodeHeight[Tree1.FocusedNode] := strtointdef(edit8.Text ,50);
end;
I would like to set the height of Tvirtualstringtree
in multiselect nodes. How to do it?
There's no way to setup node height for selected nodes in one call, so I guess you're asking just for selected nodes iteration. So to setup height for all selected nodes, you can write e.g.:
var
Size: Cardinal;
Node: PVirtualNode;
begin
Size := StrToIntDef(Edit8.Text, 50);
Tree1.BeginUpdate;
try
for Node in Tree1.SelectedNodes do
Tree1.NodeHeight[Node] := Size;
finally
Tree1.EndUpdate;
end;
end;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With