The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I am having a problem with the TabControlAdv. At run time I want to set which pages are visible, and which are not. However, i am having a problem, where if I set the first page visibility to false, I still see the contents of the page when the form loads. Is there a way to prevent this.
Thanks,
Michael Sabin
ADAdministrator 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.
ADAdministrator 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.