TAdvTreeView highlight node without click event

I have a problem with my TAdvTreeView. I would like to highlight a node (child node) without click-event. So I am already able to first collapse all nodes and afterwards open only the relevant root node. Then the child nodes are shown and I would like to highlight one of them without any click event. I have one column with 10 root nodes and each root node has 1 to 7 subnodes. For example:
A (with subnodes A1, A2)
B

  • B1
  • B2
  • B3

I open the form with the name "B3" and therefore I would like to highlight the "B3" subnode too. I have already tried a few options just as FocusedNode and SelectedNode. The root node (B) of the subnode "B3" should also be highlighted. I hope my point is clear. These are my node settings:

NodesAppearance.Font.Size:= 11;
NodesAppearance.SelectedFill.Color:= clWhite;
NodesAppearance.SelectedFontColor:= clGreen;
NodesAppearance.SelectedStroke.Color:= clWhite;
NodesAppearance.ShowFocus:= true;

vstMenu.Interaction.ExtendedSelectable:= true;

Thanks

Hi,

Do you mean you want to highlight the node you selected and then also the children? Selecting multiple nodes? If you want to select multiple nodes, please enable AdvTreeView1.Interaction.MultiSelect := true; then you can select multiple nodes with the AdvTreeView1.SelectNodes method.

Hi Pieter,

great now it works.
Thanks!

1 Like

Thanks for the confirmation!

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.