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.
Unfortunately, activation email could not send to your email. Please try again.

Making a Tab Invisible in the TabControl

Thread ID:

Created:

Updated:

Platform:

Replies:

29958 Jun 8,2005 04:46 AM Jun 9,2005 02:42 PM Windows Forms 2
loading
Tags: Tools
Nick Zdunic
Asked On June 8, 2005 04:46 AM

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

Nick Zdunic
Replied On June 8, 2005 11:04 PM

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 > >

Administrator [Syncfusion]
Replied On June 9, 2005 02:42 PM

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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;