Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » How to get tab name Collapse All
Subject Author Date
himanshu joshi Dec 20, 2006 - 5:42 AM


I have created a ribbon control with 5 ribbon tabs and each tab having 5 ribbon groups inside them.
Now, at run time i want tab names and their group names to be available to me .
How this can be acheived.

e.g Tab names: Home , Insert ,Mailings ,Review ,View
Home tab have 5 groups with some names
I want the tab name "Home" and its group names as text at run time

Thanks a lot

Technical Support Dec 21, 2006 - 11:59 AM

Each tab item in the ribbon bar is an instance of the CExtRibbonButtonTabPage class which is derived from the CExtBarButton class (implementation of button in any kind of toolbar). The following methods of the CExtRibbonBar class can be used to access the CExtRibbonButtonTabPage objects:

virtual INT RibbonTabPageButton_GetIndexOf( const CExtRibbonButtonTabPage * pTBB ) const;
virtual CExtRibbonButtonTabPage * RibbonTabPageButton_GetAt( INT nPos );
const CExtRibbonButtonTabPage * RibbonTabPageButton_GetAt( INT nPos ) const;
virtual INT RibbonTabPageButton_GetCount() const;
To get the text displayed on a particular CExtRibbonButtonTabPage object you should invoke its CExtBarButton::GetText() method:
virtual CExtSafeString GetText() const;

himanshu joshi Dec 26, 2006 - 4:43 AM


I have my ribbon control built using CExtRibbonNodeTabPage added at run time passing CString moduleName as the name of the page.

CExtRibbonNodeTabPage * pRibbonNodeTabPage = new CExtRibbonNodeTabPage( 0L, NULL, moduleName );
pRibbonNodeTabPageCollection->InsertNode( NULL,pRibbonNodeTabPage);

When i use the above statements inside a for loop i want to check what all the moduleName are already added so i will be comparing the incoming moduleName with the available name.

How could i get what all the "moduleNames" which are already present inside ribbon so that new one is not repeating with old ones.

Thanks a lot