AD
Administrator
Syncfusion Team
March 18, 2005 07:24 PM UTC
Hi Michael,
The problem is that setting TabVisible doesn''t affect which TabPageAdv is currently selected. Since the first TabPageAdv is selected by default, it''ll show up when you start the page. To avoid this, you''ll need to set the SelectedIndex as follows:
for (int i = 0; i < this.tabControlAdv1.TabCount; ++i)
{
if (this.tabControlAdv1.TabPages[i].TabVisible)
{
this.tabControlAdv1.SelectedIndex = i;
break;
}
}
Of course, this won''t work if none of your Tabs are visible, but that shouldn''t be a problem.
Hope this helps.
Regards,
Gregory Austin
Syncfusion Inc.
AD
Administrator
Syncfusion Team
March 18, 2005 08:31 PM UTC
Thanks, that works
>Hi Michael,
>
> The problem is that setting TabVisible doesn''t affect which TabPageAdv is currently selected. Since the first TabPageAdv is selected by default, it''ll show up when you start the page. To avoid this, you''ll need to set the SelectedIndex as follows:
>
>for (int i = 0; i < this.tabControlAdv1.TabCount; ++i)
>{
> if (this.tabControlAdv1.TabPages[i].TabVisible)
> {
> this.tabControlAdv1.SelectedIndex = i;
> break;
> }
>}
>
>Of course, this won''t work if none of your Tabs are visible, but that shouldn''t be a problem.
>
>Hope this helps.
>
>Regards,
>Gregory Austin
>Syncfusion Inc.