0

I need to get CUI.Tab object by id/index from current Ribbon by javascript:

var ribbon = (SP.Ribbon.PageManager.get_instance()).get_ribbon();

var tab = SomePublicMethodToGetTabFromRibbonByIdOrIndex(); // <--- Subj

var group = new CUI.Group(ribbon, 'Sample.Tab.Group', 'Sample Group', 'Description', 'Sample.Group.Command', null);
var layout = new CUI.Layout(ribbon, 'Sample.Layout', 'The Layout');    
group.addChild(layout);
tab.addChild(group);    

group.selectLayout('The Layout');
SelectRibbonTab('Standard tab', true);

I didn't found any public method for it, though. Am I missing something, or should I override the whole tab now?

-1

Try this code

var tab = ribbon.getChild(your_tab_id);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.