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

Hide or Remove Tab at Run Time

Hello: I was wondering if there was any sample on how to hide/remove a tab at run time. Then add it back. I have been using the standard .net tab and have found the tab control will not allow you to close the form unless all tabs which have been activated are visible. I was hoping your control would not have these issues. Thank you in advance, Ben

10 Replies

RP Ramesh Praveen Syncfusion Team January 13, 2003 01:20 PM UTC

Ben, Our Feb release will have additional properties in our tab pages (TabVisible and TabEnabled) that will let you do this easily. -Praveen Ramesh Essential Tools Development Team


CS Craig Sturgeon January 31, 2003 02:00 AM UTC

Any word on the exact date for the Feb release? I am also interested in being able to hide tabs. Thanks


RP Ramesh Praveen Syncfusion Team January 31, 2003 12:24 PM UTC

Craig, Likely to be in late Feb. There is also a good chance we will have a beta out earlier. Regards, Praveen Ramesh


RP Ramesh Praveen Syncfusion Team January 31, 2003 12:24 PM UTC

BTW, the TabVisible property is what will let you hide the tabs. -Praveen


CS Craig Sturgeon February 14, 2003 09:41 PM UTC

Just downloaded and installed 1.5.1.6 and tried the TabVisible property. Setting it to False does hide the tab, however setting it to True does not restore/unhide the tab. Is there something else I need to do to get the tab back? Thanks, Craig


DW David Whatley February 16, 2003 03:13 PM UTC

If I were them, I wouldn't release anything on Friday like that. :) They need to be standing by to deal with the fall-out, should it happen. I've had even less luck than you trying to get it work with old projects. We always make sure we do our releases on Monday's and never on Thursday or Friday for that very reason. -- David


RP Ramesh Praveen Syncfusion Team February 17, 2003 02:37 PM UTC

Craig, We can reproduce the issue. Please use this workaround for now. We will fix this immediately. Sorry for the inconvenience. this.tab3.TabVisible = true; // To workaround the tab not getting visible immediately. this.tabControlExt1.Controls.Remove(tab3); this.tabControlExt1.TabPages.Insert(2, tab3); Regards, Praveen Ramesh


CS Craig Sturgeon February 18, 2003 03:19 PM UTC

> Craig, > > We can reproduce the issue. Please use this workaround for now. We will fix this immediately. > Sorry for the inconvenience. > > this.tab3.TabVisible = true; > // To workaround the tab not getting visible immediately. > this.tabControlExt1.Controls.Remove(tab3); > this.tabControlExt1.TabPages.Insert(2, tab3); > > Regards, > Praveen Ramesh >


CS Craig Sturgeon February 18, 2003 03:26 PM UTC

Thanks for the workaround. Two more questions on this topic: 1) The workaround uses '2' for the Index in the Insert call. I assume the eventual fix will be more general and will manage the positioning of the tabs for us so we don't have to keep track of the orginal tab positions. 2) If you hide a tab and that tab is currently the active tab page, although the tab button gets hidden, the tab page remains visible until you make another tab active. Seems like it should automatically make the next tab active and hide the "hidden" one. 3) When will the fix be available? Thanks, Craig


RP Ramesh Praveen Syncfusion Team February 19, 2003 11:22 AM UTC

1) Yes, with the fix you just have to make it visible again and the tab will be made visible in it's original position. 2) Our current behavior allows us to support "untabbed views" (like a welcome page to which the user wouldn't be allowed to tab to manually). However, knowing the opposite behavior might also be desired, we have provided the ValidateSelectedIndex method in the tab control. Call this method after making the current tab invisible. Then the next selectable tab (neither invisible or disabled) will be made the current tab. 3) There will be a release sometime this week. Regards, Praveen Ramesh

Loader.
Live Chat Icon For mobile
Up arrow icon