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.

Hide TabPages on TabBarSplitterControl

Thread ID:

Created:

Updated:

Platform:

Replies:

93397 Mar 11,2010 08:50 AM Apr 23,2010 05:35 AM Windows Forms 5
loading
Tags: Tools
Administrator [Syncfusion]
Asked On March 11, 2010 08:50 AM

I'm trying to hide/show individual TabPages on a TabBarSplitterControl.

There is a Hide() method, and a Visible property, but neither seem to have any effect.

The samples hide/show by removing/re-inserting the tabPage, which is not at all what I want to do. Am I missing something? Many thanks.

(e.g. http://www.syncfusion.com/support/kb/646/How-do-I-hide-and-show-TabBarPages-in-a-TabBarSplitterControl-which-contains-a-grid)

Rajasekar B [Syncfusion]
Replied On March 12, 2010 10:29 AM

Hi Sakkath,

Thanks for your interest in syncfusion product.

If you use this.tabBarSplitterControl1.TabBarPages.Remove(this.tabBarPage1), tabpage will only be removed from the collection and you can insert it whenever necessary using the below code

this.tabBarSplitterControl1.TabBarPages.Insert(0,this.tabBarPage1);

You can reuse that tabbarpage. Do you want the tabpage to be hidden but it should not be removed from the TabBarPages collection?

Thanks,
Rajasekar

Administrator [Syncfusion]
Replied On March 22, 2010 05:59 AM

Thanks for the reply.
Yes, I was trying to hide the sheet without removing from the collection.
E.g. I still want to process the sheet if it's hidden, but want the user to be able to hide it.
I could use two collections - one containing all pages, and another just those that are visible, but that seems like overkill. The other overhead with your method is remembering in what position the hidden pages should be added back in.

Ideally for me, setting visible to false, or calling hide(), should just skip the tab when drawing the control.
Am I stuck with the two collection solution for now?
Thanks

Rajasekar B [Syncfusion]
Replied On March 23, 2010 11:18 AM

Hi Sakkath,

Thanks for the update.

You can use the following line of code to hide the tab:

this.tabBarSplitterControl1.Bar.Tabs[i].HideButton = true;

To get the index of the particular tab, you can use the below line of code:

int i= this.tabBarSplitterControl1.TabBarPages.IndexOf(this.tabBarPage1);

Please let me know if you have any question.

Thanks,
Rajasekar

Administrator [Syncfusion]
Replied On April 21, 2010 04:00 AM

Hi Rajasekar
Thanks for the suggestion - it's been a while, I got caught up on other things...
The HideButton method certainly hides the button, but it isn't removed from the OnPaint, so it just leaves a big gap in the control.
Any way around that? I just want something like Excel where you can Hide/Show sheets, but preferably without having to actually remove/insert pages from the collection
Thanks

Rajadurai C [Syncfusion]
Replied On April 23, 2010 05:35 AM

Hi Sakkath,

Thanks for your update.

With TabBarSplitterControl, currently we don't provide support to hide the tabbarpages. However, we have logged a feature request for the same.

We will implement this feature in our forthcoming new version releases or service pack releases. The feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity.

Thank you for using Syncfusion Products.

Regards,
Rajadurai

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.

;