|
|
|
|
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 |
|
Andrew Banks
|
Jan 8, 2007 - 1:14 PM
|
SetTooltipText(int nId, BOOL bActivate = TRUE); Works with toolbar buttons. No such function that I can see in CExtCustomizeCmdTreeNode. In addition, the OnHover for Ribbon Buttons does not display any tool tip from the string table associated with the command id.
Is there one and I just can’t see it?
|
|
Sergiy Lavrynenko
|
Jan 9, 2007 - 6:18 AM
|
Dear Andrew,
The CExtRibbonBar /CExtRibbonPage controls are able to display classic toolbar tooltips like the CExtToolControlBar window does. But these tips are not very consistent with the ribbon’s design. The super tooltip windows with caption, description paragraph, bitmap, bottom paragraph (typically displaying the Press F1 for help text) is to be appear at the end of January/begin of February. If you need toolbar like tips right now, then you should initialize them in the command manager after the command tree was assigned to the CExtRibbonBar or CExtRibbonPage control:
UINT nCommandID = ID_SOME_ITEM_IN_THE_RIBBON_BAR;
CExtRibbonBar * pRibbonBar = ... // or CExtRibbonPage
ASSERT( pRibbonBar->GetSafeHwnd() != NULL );
LPCTSTR strCommandProfileName = g_CmdManager->ProfileNameFromWnd( pRibbonBar->m_hWnd );
ASSERT( strCommandProfileName != NULL && INT(_tcslen(strCommandProfileName)) > 0 );
CExtCmdItem * pCmdItem = g_CmdManager->CmdGetPtr( strCommandProfileName, nCommandID );
ASSERT( pCmdItem != NULL );
pCmdItem->m_strTipTool = _T("Tooltip text to be displayed in the popup tip window");
|
|
Andrew Banks
|
Jan 9, 2007 - 10:52 AM
|
This work well thanks
CExtCmdItem * CMyRibbonBar::RibbonCmdIDtoCmdItem( UINT command_id ) { CExtCmdItem * pCmdItem = g_CmdManager->CmdGetPtr( g_CmdManager->ProfileNameFromWnd( m_hWnd ), command_id ) ; return( pCmdItem ) ; }
void CMyRibbonBar::SetToolTips() { INT nIndex, nCount = GetButtonsCount(); for( nIndex = 0; nIndex < nCount; nIndex ++ ) { CExtBarButton * pTBB = GetButton( nIndex ); ASSERT_VALID( pTBB );
if ( pTBB->IsSeparator() ) continue;
UINT command_id = pTBB->GetCmdID( false ) ; CExtCmdItem * pCI = RibbonCmdIDtoCmdItem( command_id) ; if ( pCI != NULL ) pCI->m_sTipTool.LoadString(command_id) ;
} // for( nIndex = 0; nIndex < nCount; nIndex ++ ) }
|
|
Andrew Banks
|
Jan 9, 2007 - 6:25 PM
|
CExtPopupMenuWnd::_OnMouseClick
Found a place to get the screen coords of the menu item Changed your source only a little.
|
|
Sergiy Lavrynenko
|
Jan 11, 2007 - 6:14 AM
|
Dear Andrew,
Changing Prof-UIS code will bring inconvenience with each new Prof-UIS release. I think it should not be a problem to discuss any Prof-UIS modifications and put them into the library as you did or implement them in your classes which should be derived from Prof-UIS classes in scope of your project(s).
|
|
Andrew Banks
|
Jan 11, 2007 - 7:19 AM
|
OK, there is no standard mechanism to connect CRibbon tree nodes and GUI for the file menu entries. The file menu componants, do not appear in the iterative process using GetButton. Nor, are they child windows so I can’t use EnumChildWindows. Finally, there is no virtual function to get access.
However, I have full access to the "recent file menu entries".
If you could provide something like that, it would be great. My change was a stupid PostMessage with a function code of 50000 containing the screen coords of the point. I wasn’t trying to write something for general consumption and it was only 5 lines of code, took less than 1/2 hour once I knew the right place in your code.
For now, I have methods to handle your software updates. Thanks
|
|