Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27201

Moving to top of TreeView after ExpandAll()

$
0
0
Greetings:

I am trying to move to the top of my TreeView control after expanding all. This means that I should see the highlighted node (0) after the ExpandAll is done. But nothing I have tried does this.

Bellow is my code:

Private Sub btnExpandAll_Click(sender As Object, e As EventArgs) Handles btnExpandAll.Click
trvMasterFormat.Focus()
trvMasterFormat.ExpandAll()
trvMasterFormat.SelectedNode = trvMasterFormat.Nodes(0)
trvMasterFormat.Refresh()
End Sub

Any help in this regard woulkd be greatly appreciated.

Thanks!

Viewing all articles
Browse latest Browse all 27201

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>