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.

TabControlAdv setting first page TabVisible = false

Thread ID:

Created:

Updated:

Platform:

Replies:

26269 Mar 17,2005 05:47 PM Mar 18,2005 03:31 PM Windows Forms 2
loading
Tags: Tools
Administrator [Syncfusion]
Asked On March 17, 2005 05:47 PM

I am having a problem with the TabControlAdv. At run time I want to set which pages are visible, and which are not. However, i am having a problem, where if I set the first page visibility to false, I still see the contents of the page when the form loads. Is there a way to prevent this. Thanks, Michael Sabin

Administrator [Syncfusion]
Replied On March 18, 2005 02:24 PM

Hi Michael, The problem is that setting TabVisible doesn''t affect which TabPageAdv is currently selected. Since the first TabPageAdv is selected by default, it''ll show up when you start the page. To avoid this, you''ll need to set the SelectedIndex as follows: for (int i = 0; i < this.tabControlAdv1.TabCount; ++i) { if (this.tabControlAdv1.TabPages[i].TabVisible) { this.tabControlAdv1.SelectedIndex = i; break; } } Of course, this won''t work if none of your Tabs are visible, but that shouldn''t be a problem. Hope this helps. Regards, Gregory Austin Syncfusion Inc.

Administrator [Syncfusion]
Replied On March 18, 2005 03:31 PM

Thanks, that works >Hi Michael, > > The problem is that setting TabVisible doesn''t affect which TabPageAdv is currently selected. Since the first TabPageAdv is selected by default, it''ll show up when you start the page. To avoid this, you''ll need to set the SelectedIndex as follows: > >for (int i = 0; i < this.tabControlAdv1.TabCount; ++i) >{ > if (this.tabControlAdv1.TabPages[i].TabVisible) > { > this.tabControlAdv1.SelectedIndex = i; > break; > } >} > >Of course, this won''t work if none of your Tabs are visible, but that shouldn''t be a problem. > >Hope this helps. > >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.

;