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

linking a ribbontab on click?

using Word as example; exampleWordUI (ignore the highlighted box)

Imagine a TabControlAdv with some tabs below the Ribbon. What I want to do is, when a defined tabPage is selected, it would change/select the Ribbontab on the mainpanel itself too. So if i had 3 tabs on TabControlAdv, clicking the 0 would go to the "home" on Word, 1 would select the "insert" tab, etc.

Is it possible?

i tried using "ribbonControlAdv1.TabIndex" but seems to not be it.

4 Replies

AR Arthur April 12, 2019 11:21 AM UTC

bump


SR Sabaridass Ramamoorthy Syncfusion Team April 15, 2019 05:19 AM UTC

Hi Arthur,

Thanks for contacting Syncfusion support.

We can change selected tab item(ToolStripTabItem) of RibbonControlAdv using “SelectedTab” property of RibbonControlAdv. We have prepared a simple sample to achieve your requirement. In this sample, we have changed the RibbonTab according to Selected tab of TabControlAdv using  “SelectedIndexChanged” event. Please refer the below code example.

 

        private void tabControlAdv1_SelectedIndexChanged(object sender, EventArgs e) 
        { 
            if(tabControlAdv1.SelectedIndex == 0) 
            { 
                ribbonControlAdv1.SelectedTab = toolStripTabItem1; 
            } 
            else 
            { 
                ribbonControlAdv1.SelectedTab = toolStripTabItem2; 
            } 
        }

 


 
Refer to the attached sample from below location.
http://www.syncfusion.com/downloads/support/forum/143963/ze/WF_RIB~11274815044


Regards, 
Sabaridass R 



AR Arthur April 15, 2019 11:36 AM UTC

That's exactly what I wanted, thanks!!


SR Sabaridass Ramamoorthy Syncfusion Team April 16, 2019 10:15 AM UTC

Hi Arthur, 
 
Thanks for the update and we are glad to know that your requirement is achieved. 
 
Please let me know if you need any further assistance on this. 
 
Regards, 
Sabaridass R  


Loader.
Live Chat Icon For mobile
Up arrow icon