![]() |
Ribbon menu shortcuts |
Post Reply
|
| Author | |
JamesP
Groupie
Joined: 07 January 2009 Location: United Kingdom Status: Offline Points: 73 |
Post Options
Thanks(0)
Quote Reply
Topic: Ribbon menu shortcutsPosted: 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 |
Post Options
Thanks(0)
Quote Reply
Posted: 15 January 2009 at 3:54am |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 15 January 2009 at 4:17am |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 15 January 2009 at 4:28am |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 15 January 2009 at 5:02am |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 15 January 2009 at 7:05am |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 15 January 2009 at 8:43am |
|
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 |