|
|
|
|
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.
Subject |
Author |
Date |
|
Robert Webb
|
Oct 16, 2008 - 1:35 AM
|
(1) Is it possible to have tool tips for ribbon bar tabs? How would I do that? (2) Is it possible to display an icon to the left of the text in ribbon bar tabs? That is, an icon for each tab. Thanks,
Rob.
|
|
Technical Support
|
Oct 17, 2008 - 1:08 PM
|
Here is the modified version of the CMainFrame::_InitRibbonPage_Home() method from the RibbonBar sample which makes the Home tab item in the ribbon bar display a big screen tip (we have initialized it with the same text and image as the ribbon file menu): CExtRibbonNode * CMainFrame::_InitRibbonPage_Home()
{
CExtRibbonNodeTabPage * pRibbonNodeTabPage = new CExtRibbonNodeTabPage( 0L, NULL, _T("Home") );
CExtCustomizeCmdScreenTip * pCmdScreenTip = new CExtCustomizeCmdScreenTip;
pCmdScreenTip->CaptionMainSet( _T("Application Button") );
pCmdScreenTip->TextMainSet( _T("Click here to open, save or print,\nand to see everything else you can\ndo with the document.") );
pCmdScreenTip->BmpMainGet().LoadBMP_Resource( MAKEINTRESOURCE(ID_FILE_DLB_TIP_IMAGE) );
pCmdScreenTip->BmpMainGet().Make32();
pCmdScreenTip->BmpMainGet().AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
pRibbonNodeTabPage->CmdScreenTipAttach( pCmdScreenTip );
pRibbonNodeTabPage->CmdKeyTipSet( new CExtCustomizeCmdKeyTip( __EXT_MFC_SAFE_TCHAR( _T(’H’) ) ), false );
pRibbonNodeTabPage->InsertNode( NULL, _InitRibbonNode_Home_Clipboard() );
pRibbonNodeTabPage->InsertNode( NULL, _InitRibbonNode_Home_Font() );
pRibbonNodeTabPage->InsertNode( NULL, _InitRibbonNode_Home_Paragraph() );
pRibbonNodeTabPage->InsertNode( NULL, _InitRibbonNode_Home_Style() );
pRibbonNodeTabPage->InsertNode( NULL, _InitRibbonNode_Home_Find() );
return pRibbonNodeTabPage;
} The icons on ribbon tabs are not supported at this moment. Besides, the Windows Vista UI Guidelines strongly recommend not to use icons on tabs: http://msdn.microsoft.com/en-us/library/aa511493.aspxHere is the text from the document referred above: Don’t put icons on tabs. Icons usually add unnecessary visual clutter, consume screen space, and often don’t improve user comprehension.
|
|