We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Making a Tab Invisible in the TabControl

I''m using the tabcontrol which has 4 tabs. In some instance when the form loads I have code which is enacted to make the first tab invisible, by setting TabVisible to false. When this code is used, the tab dissappears, but the next tab which should be visible partly hidden by a panel which looks like the remnants of the first tab. Clicking on the tab, forces a refresh and I see the contents of the tab. See the attached Word Document for examples. TabDisplayError_4233.zip

2 Replies

NZ Nick Zdunic June 9, 2005 03:04 AM UTC

So - is there a way to prevent this from happening? >I''m using the tabcontrol which has 4 tabs. > >In some instance when the form loads I have code which is enacted to make the first tab invisible, by setting TabVisible to false. > >When this code is used, the tab dissappears, but the next tab which should be visible partly hidden by a panel which looks like the remnants of the first tab. > >Clicking on the tab, forces a refresh and I see the contents of the tab. > >See the attached Word Document for examples. > > > >TabDisplayError_4233.zip > >


AD Administrator Syncfusion Team June 9, 2005 06:42 PM UTC

Hi Nick, This problem is occuring because you''re hiding the currently selected tab without changing the selection. To avoid this, please use something similar to the following code snippet after setting the tab visibility: foreach (TabPageAdv page in this.tabControlAdv1.TabPages) { if (page.TabVisible) { this.tabControlAdv1.SelectedTab = page; break; } } Regards, Gregory Austin Syncfusion Inc.

Loader.
Up arrow icon