Question TreeView and TabControlPanel

mcavanilla

Member
Joined
Apr 2, 2013
Messages
5
Programming Experience
Beginner
Hello,


I'm a beginner on VB.net, and I have a form with a Treeview on left side (3 nodes), and a TabControlPanel on right side (3 tabs). My question is, how can I select the tab using the nodes. For example: I need select the node0 and show the tab1, select the node1 and show the Tab2.


Someone can help me with this question?


Thanks

Marco
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,570
Location
Sydney, Australia
Programming Experience
10+
First of all, what's a TabControlPanel? Do you actually just mean a TabControl, or is it some third-party control that is similar but not the same. If it's something else then it may well work differently to a regular TabControl, so we may be wasting our time providing advice if we're not familiar with that control. If it is just a TabControl then you can see that you've already caused reasonable confusion simply by using other then the correct name.

Assuming that it is just a regular TabControl, you can handle the AfterSelect event of the TreeView, get the Index of the node that was selected and assign that to the SelectedIndex of the TabControl.
 

mcavanilla

Member
Joined
Apr 2, 2013
Messages
5
Programming Experience
Beginner
Yes, It's a regular TabControl. I trying my code getting the index of the node and Works very well! Thanks for help and sorry about my poor english!!
 
Top Bottom