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

TabControlExt is not hiding active TabPageExt

Hi, I am using 1.6.1.8 tab control ext. It has about 4 tab page exts. When I am on 2nd tab and try to set the tabVisible=false on the same tab, it removes the top tab header. But the tab page itself is still there. After that if I switch other tabs, it is hiding the tab page. To reproduce this bug goto XPTabs sample. Replace this method private void tab1button1_Click(object sender, System.EventArgs e) { tab1.TabVisible = false; } Run the sample. Click on the "Contact info" tab. Now click on Fetch info button. Notice that you still see the email, address, phone # etc. fields. It should hide this tab page even if it is visible. thanks, - Reddy

3 Replies

Arun Srinivasan November 4, 2003 09:20 PM UTC

Hi Reddy, This happens because there are instances where users want to just hide the tab and not it's contents and hence this is the intended behaviour when you try to hide an active tab. You could do something like: this.tab1.TabVisible=false; this.tabControlExt1.SelectedTab = tab2; to do what you are looking for. Thanks Arun

Administrator November 5, 2003 11:31 AM UTC

Arun, In one of our application windows we have about 5 tabs. When the user picks a menu item or clicks on a tooldbar buttons, some of the information in the window does not make sense at that point. So we hide couple of tabs (say tab 2 and tab3). If I am viewing tab2, when I click my toolbar button, it removes the tab from the tab strip. But the tab2-page and its controls are still visible. This is certainly not the behavior anybody would like with "TabVisible=false". According to your work around, we will have to check if the tab is selected, then select some other tab and then hide it. We don't do this kind of things for other controls. Why just for this? thanks, - Reddy

Arun Srinivasan November 5, 2003 11:51 AM UTC

Hi Reddy, A better solution to do what you are looking for is to call the ValidateSelectedIndex() method as this will ensure that the current selected tab is not disabled or invisible. So doing: this.tab1.TabVisible=false; this.tabControlExt1.ValidateSelectedIndex(); should take care of this issue. Regards Arun
Loader.
Live Chat Icon For mobile
Up arrow icon