List Control details in the ribbon

Add-in Express™ Support Service
That's what is more important than anything else

List Control details in the ribbon
 
Siddharth Rout




Posts: 18
Joined: 2020-03-26
My Ribbon AdxRibbonTab1 has 3 groups and has lot of controls like AdxRibbonGallery and AdxRibbonButtons. I would like to export the names, caption and Supertip of all controls. I am stuck in how to loop through all these controls? To begin with how do I get the Ribbon object?



Dim btnRib As ADXRibbonButton = Nothing
Dim grpRib As ADXRibbonGroup = Nothing
Dim glryRib As ADXRibbonGallery = Nothing

For Each grpRib In ????
    For Each glryRib In ????
        For Each btnRib In ???


        Next
    Next
Next
Regards

Siddharth Rout
Founder
XPIZON

[Skype]: XPIZON, [Email]: srout@xpizon.com, [Website]: www.SiddharthRout.Com; www.xpizon.com
Posted 14 Sep, 2020 09:58:36 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Siddharth,

Every Ribbon component descends from ADXRibbonCustomControl providing a number of cast properties: AsRibbonButton, AsRibbonGroup, etc.) It also provides the GetControls() method. You start with calling GetControls() on an ADXRibbonTab representing the tab in question. If the method returns ADXRibbonControlCollection (not null), you scan the collection testing if the next object is a group, gallery, button, etc. If it isn?Â?Ð?ét a button, call GetControls() and if it returns a non-null value, scan the collection. Recursion.


Andrei Smolin
Add-in Express Team Leader
Posted 15 Sep, 2020 03:36:41 Top