ChewDoggie
Programmer
Hello,
Does anyone know how to programmatically set WHICH TAB is selected when a form that contains a TabControl is loaded?
I have two tabs, tbPersonalInfo (the first tab) and tbContactInfo (the second tab). I'd like to have the tbContactInfo tab selected when the form opens.
I've tried:
AND ALSO:
And neither method selects the desired tab.
Thanks !
Chew
10% of your life is what happens to you. 90% of your life is how you deal with it.
Does anyone know how to programmatically set WHICH TAB is selected when a form that contains a TabControl is loaded?
I have two tabs, tbPersonalInfo (the first tab) and tbContactInfo (the second tab). I'd like to have the tbContactInfo tab selected when the form opens.
I've tried:
Code:
private void TabbedDetails_Activated(object sender, EventArgs e)
{
switch (WhichTab)
{
case "personal":
this.tbPersonalInfo.Select();
break;
case "contact":
tbContactInfo.Select();
break;
}
}
AND ALSO:
Code:
private void TabbedDetails_Activated(object sender, EventArgs e)
{
switch (WhichTab)
{
case "personal":
this.tbPersonalInfo.Show();
break;
case "contact":
tbContactInfo.Show();
break;
}
}
And neither method selects the desired tab.
Thanks !
Chew
10% of your life is what happens to you. 90% of your life is how you deal with it.