VB.NET:
Private Sub TreeView_1_AfterSelect(sender As Object, e As TreeViewEventArgs) Handles TreeView_1.AfterSelect
Try
Debug.WriteLine(e.Node.IsExpanded)
Me.TextBox_LastSelected.Text = CStr(e.Node.Tag)
Debug.WriteLine(e.Node.IsExpanded)
Catch ex As Exception
MessageBox.Show("ex.message")
End Try
End Sub
I have a TreeView that when I select a node it expands. I don't want it to expand unless the user clicks the expand symbol.
I replaced the code I had in the AfterSelect Sub with the above test code.
It prints False then True.
If I replace CStr(e.Node.Tag) with "JUNK" it prints False then False, which is the desired behavior.
But I need to copy the Tag into the Text!
Is there a way to get the desired behavior?