Reputation: 177
If TreeView1.SelectedNode.Name = 2 Then
WebBrowser1.Url = My.Resources.Welcome
End If
and it doesn't work so if you could please provide an example.
Also i don't really know how the treeview control works, i know with the combo box or listbox you just have an index of 0, 1, 2, 3 etc. but with the treeview you don't any just one of the things I want to do is whenever the root node is selected i want it to deselect that and select the node that I specify like node.name = 2.
I'm using visual basic 2010
Upvotes: 0
Views: 4959
Reputation: 7199
Use DocumentText Property:
If TreeView1.SelectedNode.Name = 2 Then
WebBrowser1.DocumentText = My.Resources.Welcome
End If
Upvotes: 2