![]() |
Changing the Keyboardtip value for the 'File' tab |
Post Reply ![]() |
Author | |
Enclaved Shadow ![]() Groupie ![]() ![]() Joined: 22 August 2006 Location: Canada Status: Offline Points: 31 |
![]() ![]() ![]() ![]() ![]() Posted: 20 December 2011 at 2:53pm |
Is there a way to manually change the Keyboardtip value for the 'File' tab? Due to international localization issues we have had to manually specify the keyboard tips for every control on our Ribbon. I have been able to do this for all controls except for the 'File' tab. Below is some code I have tried but none of it works.
CXTPControlPopup* opControlFile = (CXTPControlPopup*)m_opRibbonBar->AddSystemButton(ID); opControlFile->SetKeyboardTip(_T("Z1")); CXTPRibbonControlTab* opCtrlTab = m_opRibbonBar->GetControlTab(); opCtrlTab->SetKeyboardTip(_T("Z2")); CXTPRibbonControlSystemButton* opSystemButton = m_opRibbonBar->GetSystemButton(); opSystemButton->SetKeyboardTip(_T("Z3")); It seems no matter what I do the 'File' tab always uses the default generated value as seen below: ![]() |
|
![]() |
|
Enclaved Shadow ![]() Groupie ![]() ![]() Joined: 22 August 2006 Location: Canada Status: Offline Points: 31 |
![]() ![]() ![]() ![]() ![]() |
I have found the source of the problem. We are using ToolkitPro 15.0.2 and in the file XTPRibbonBar.cpp there is a method called 'void CXTPRibbonBar::CreateKeyboardTips()'. The following is a small code snippet from that method:
if (m_pControlSystemButton) { CPoint pt(m_pControlSystemButton->GetRect().CenterPoint().x, m_pControlSystemButton->GetRect().CenterPoint().y); CXTPCommandBarKeyboardTip* pWnd = new CXTPCommandBarKeyboardTip(pCommandBars, m_pControlSystemButton, m_pControlSystemButton->GetCaption(), pt, DT_VCENTER | DT_CENTER, m_pControlSystemButton->GetEnabled()); pCommandBars->m_keyboardTips.arr.Add(pWnd); } In the above code the assigned keyboard tip is ignored. The code posted below should resolve the situation: if (m_pControlSystemButton) { CPoint pt(m_pControlSystemButton->GetRect().CenterPoint().x, m_pControlSystemButton->GetRect().CenterPoint().y); CXTPCommandBarKeyboardTip* pWnd = new CXTPCommandBarKeyboardTip(pCommandBars, m_pControlSystemButton, m_pControlSystemButton->GetCaption(), pt, DT_VCENTER | DT_CENTER, m_pControlSystemButton->GetEnabled()); if (!m_pControlSystemButton->GetKeyboardTip().IsEmpty()) { pWnd->m_strTip = m_pControlSystemButton->GetKeyboardTip(); } pCommandBars->m_keyboardTips.arr.Add(pWnd); } This is actually a big problem for us and it is a little too close to our release date to update our version of Codejock so we are going to have to modify the source and rebuild everything. Would it be possible to have this fix added to the next update/patch of ToolkitPro? |
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
I reported this long ago. Hope they listen this time :)
|
|
PokerMemento - http://www.pokermemento.com/
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |