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

How to hide TabPageAdv when TabPageAdvCollection count is reduced to one in WinForms TabControlAdv?

Platform: WinForms |
Control: TabControlAdv

Hide tab page in TabControlAdv

In TabControlAdv, when the TabPageAdvCollection count is reduced to one it can be hidden by handling its SelectedIndexChanged event and using TabVisible property in TabPageAdv.


private void tabControlAdv1_SelectedIndexChanged(object sender, EventArgs e)
   if(tabControlAdv1.TabCount == 1)
      tabControlAdv1.SelectedTab.TabVisible = false;
private void button1_Click(object sender, EventArgs e)
   tabControlAdv1.SelectedTab.TabVisible = true;
   TabPageAdv page = new TabPageAdv();
   page.Text = "NewTab";


Private Sub tabControlAdv1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles tabControlAdv1.SelectedIndexChanged
   If tabControlAdv1.TabCount = 1 Then
      tabControlAdv1.SelectedTab.TabVisible = False
   End If
End Sub
Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles button1.Click
   tabControlAdv1.SelectedTab.TabVisible = True
   Dim page As New TabPageAdv()
   page.Text = "NewTab"
End Sub

Sample: http://www.syncfusion.com/downloads/support/directtrac/general/TabControlAdv1797729526.zip

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon 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.Close Icon

Live Chat Icon For mobile