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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TabPrimitives Visible and Dropdown

Thread ID:

Created:

Updated:

Platform:

Replies:

132852 Sep 25,2017 02:24 PM UTC Sep 28,2017 12:31 PM UTC WinForms 3
loading
Tags: TabControlAdv
Qingde Shi
Asked On September 25, 2017 02:24 PM UTC

Hi,

How to show or hide TabPrimitives based on if there are tabs that are not shown when tabs are in single line mode, and how to make the TabPrimitives's dropdown to only show the tabs not shown?

Thanks,

Q

Durga Rajan [Syncfusion]
Replied On September 26, 2017 12:53 PM UTC

Hi Qingde, 

Thanks for contacting Syncfusion support. 

We have analyzed your query and prepared sample to meet your requirement. In this sample we have changed the visibility of the TabPrimitivesHost to true, if the total width of the TabPages are greater than tabcontrol’s width. Otherwise visibility of the TabPrimitivesHost will be false. Please download the sample for the same from below location, 


Please find the code example to update the visibility of the TabPrimitiviesHost from below table, 

        private void UpdatePrimitiveHostVisibility() 
        { 
            int TabRectWidth = 0; 
            if (this.tabControlAdv1 != null && this.tabControlAdv1.TabPages != null) 
            { 
                for (int i = 0; i < this.tabControlAdv1.TabPages.Count; i++) 
                { 
                    TabRectWidth += this.tabControlAdv1.GetTabRect(i).Width; 
                } 
                if (this.tabControlAdv1.Width < TabRectWidth) 
                { 
                    this.tabControlAdv1.TabPrimitivesHost.Visible = true; 
                } 
                else 
                { 
                    this.tabControlAdv1.TabPrimitivesHost.Visible = false; 
                } 
            } 
        } 

If we misunderstood your query please provide more details about your requirement with sample. This would help us to provide the solution at earliest. 

Regards, 
Durga S. 


Qingde Shi
Replied On September 27, 2017 02:00 PM UTC

Great! Thanks. It gave me ideas on how to solve this issue. Tabgap, TabVisible should be considered as well.


Durga Rajan [Syncfusion]
Replied On September 28, 2017 12:31 PM UTC

Hi Qingde, 

Thanks for your suggestions.  

We have modified our sample based on your considerations. In this sample, we have changed the visibility of the TabPrimitivesHost based on the TabVisible property and TabGap property along with TabPages width. 


Please let us know if you need any further assistance. 

Regards, 
Durga S. 


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.

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

;