![]() |
Ribbon menu shortcuts |
Post Reply ![]() |
Author | |
JamesP ![]() Groupie ![]() ![]() Joined: 07 January 2009 Location: United Kingdom Status: Offline Points: 73 |
![]() ![]() ![]() ![]() ![]() Posted: 14 January 2009 at 5:58am |
We're using a ribbon control with popup menus, but no tabs. We've found that the shortcuts (the underlines) and the accelerator table are missing from all the items. I'm adding SubMenu items using the code:
CXTPControlPopup* pControlOptions;
pControlOptions = (CXTPControlPopup*)m_pRibbonBar->GetControls()->Add(xtpControlPopup, -1);
pControlOptions->SetCommandBar(menu.GetSubMenu(0));
pControlOptions->SetCaption(_T("&File"));
I've tried adding the code:
m_pRibbonBar->GetCommandBars()->GetShortcutManager()->SetAccelerators(IDR_MAINFRAME);
but this does not work.
Does anyone have any suggestions? The shortcuts (I did not notice the accelerators) definitely worked before I moved over to version 12.1.1 of the toolkit.
|
|
![]() |
|
Oleg ![]() Senior Member ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
You can't press Alt+F to show File or you just don't see underline ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
JamesP ![]() Groupie ![]() ![]() Joined: 07 January 2009 Location: United Kingdom Status: Offline Points: 73 |
![]() ![]() ![]() ![]() ![]() |
When I press the Alt key all the underlines appear, and pressing Alt + F brings up the file menu.
The accelerators (such as Ctrl + S for Save) also work but do not appear in the menus, for the users information.
|
|
![]() |
|
Oleg ![]() Senior Member ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
pCommandBars->GetShortcutManager()->SetAccelerators(IDR_MAINFRAME); have add them
check if you have Ctrl+S in accelerator table for IDR_MAINFRAME
also try comment LoadCommandBars once - maybe you load empty trable from registry.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
JamesP ![]() Groupie ![]() ![]() Joined: 07 January 2009 Location: United Kingdom Status: Offline Points: 73 |
![]() ![]() ![]() ![]() ![]() |
Thanks for your quick response Oleg.
I already call LoadCommandBars after I've created my Ribbon with its menu items, and toolbars.
I tried putting the call:
m_pRibbonBar->GetCommandBars()->GetShortcutManager()->SetAccelerators(IDR_MAINFRAME);
after the call to LoadCommandars but that didn't help. Also I ensured the registry was clean, in case it was picking anything up from there.
|
|
![]() |
|
Oleg ![]() Senior Member ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hello,
try to reproduce it with our sample. :( It works for me.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
JamesP ![]() Groupie ![]() ![]() Joined: 07 January 2009 Location: United Kingdom Status: Offline Points: 73 |
![]() ![]() ![]() ![]() ![]() |
Which sample? You don't have any samples that use Ribbons with menus. You do add an Options button on the right and when I add an ampersand before the O, an underline does not show.
If you have a ribbon sample with menus that has shortcuts and accelerators working could you send it to me?
|
|
![]() |
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 |