Professional UI Solutions
Site Map   /  Register
 
 

Forum

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 » Getting Tab Names ? Collapse All
Subject Author Date
himanshu joshi Dec 28, 2006 - 2:56 AM

Hi

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

Technical Support Dec 28, 2006 - 8:03 AM

The pRibbonNodeTabPage->GetTextUser() returns the previously assigned module name. Is that what you are looking for?

Technical Support Dec 30, 2006 - 12:59 PM

The following code enumerates the tab pages:

CExtRibbonNodeTabPageColletion * pNodeCollectionOfTabPages = ... // ... = pRibbonBar->RibbonGetTabPageRootNode();
int nIndex, nCount = pNodeCollectionOfTabPages->GetNodeCount();
    for( nIndex = 0; nIndex < nCount; nIndex++ )
    {
        CExtCustomizeCmdTreeNode * pPage = pNodeCollectionOfTabPages->ElementAt( nIndex );
        CExtSafeString strText = pPage = pPage->GetTextUser();
        if( strText == strModuleName )
            ...
    }