Hi,
If a node is selected using the command "TreeView.SelectNode" the OnAfterSelectNode event isn't fired. I believe it should fire. I explain here:
https://www.loom.com/share/d74d5a8ef43b4b5a9fdbbce29f531c0c
Here's a link to the zipped project:
https://www.dropbox.com/s/g8wr71cylv8oyla/AdvTreeView-Select-Node.zip?dl=0
Best regards,
Steve
And here's a follow-up issue:
https://www.loom.com/share/f01a6177db254d5cb5045ddfb034740e
In the OnAfterSelectNode event, the node that is passed is not the same as TreeView.SelectedNode — surely it should be?
Best regards,
Steve
I'm using Delphi 10.4.2 and AdvTreeView 1.1.5.1
Programmatically selecting a node does not trigger the OnAfterSelectNode, only with keyboard or mouse interaction.
Thanks for the clarification Pieter.
It's good to know but doesn't seem logical. What about second point — "in the OnAfterSelectNode event, the node that is passed is not the same as TreeView.SelectedNode"?
Steve
We'll investigate what is going wrong here, the selected node is updated afterwards. You can use the OnFocusedNodeChanged event, the OnNodeClick event, or use the SelectedNodes array, which is properly updated in between before and after events:
AdvTreeView1.SelectedNodes[0]
1 Like