TD-22644: SalRibbonSetItemAccelerator does not work properly

Report TD 5.x and 6.x bugs and possible workarounds.
Acclaro
Germany
Posts: 169
Joined: 16 Mar 2017, 08:13
Location: Hannover, Deutschland

TD-22644: SalRibbonSetItemAccelerator does not work properly

Post by Acclaro » 13 Jan 2016, 18:57

Tab 1, Button with accelerator "Ctrl-S",
Tab 1 active, the accelerator works.

Switch to tab "Tab 2" and press "Ctrl-S", the accelerator does not work.

see sample
You do not have the required permissions to view the files attached to this post.

Mike Vandine

Re: TD-22644: SalRibbonSetItemAccelerator does not work properly

Post by Mike Vandine » 15 Jan 2016, 03:04

Hi,

Sorry, I'm a bit confused about what you want to happen. Tab 1 has a button with an accelerator of ctrl-s on it. If you go to tab 2, that button isn't active on that tab. Would you expect the accelerator that's on a button in tab 1 to fire?

Thanks for the clarification.

Best regards,

Mike Vandine

Re: TD-22644: SalRibbonSetItemAccelerator does not work properly

Post by Mike Vandine » 15 Jan 2016, 03:08

I've played with this a bit. Here are some things that I've tried:

Added a button on the Tab2 and set the accelerator.

Call AddRibbonType( '00', '', RIBBON_ITEM_TYPE_TAB, 1, "Tab 1", "")
Call AddRibbonType( '00.01', '00', RIBBON_ITEM_TYPE_GROUP, 1, "Button with Accelerator", "")
Call AddRibbonType( '00.01.00', '00.01', RIBBON_ITEM_TYPE_BUTTON, 0, "Button - press CTRL S", "CTRL S")
Call AddRibbonType( '01', '', RIBBON_ITEM_TYPE_TAB, 1, "Tab 2", "")
Call AddRibbonType( '01.01', '01', RIBBON_ITEM_TYPE_GROUP, 1, "Button with Accelerator", "")
Call AddRibbonType( '01.01.00', '01.01', RIBBON_ITEM_TYPE_BUTTON, 0, "Button - press CTRL S", "CTRL S")
Call SalRibbonSetItemAccelerator( frm1, '00.01', 2, 83 )
Call SalRibbonSetItemAccelerator( frm1, '01.01', 2, 83 )
Call SalSetActiveRibbonPage( frm1, 0 )

When run, the accelerator works for tab 1, but not for tab 2. If I disable the accelerator for tab 1, then the accelerator for tab 2 works.

So, it looks like possibly only one accelerator is possible for the ribbon?

Acclaro
Germany
Posts: 169
Joined: 16 Mar 2017, 08:13
Location: Hannover, Deutschland

Re: TD-22644: SalRibbonSetItemAccelerator does not work properly

Post by Acclaro » 15 Jan 2016, 12:39

An example:
In Microsoft Word, Excel ..., the Accelerator for save "CTRL + S".
No matter which tab is active, the function is available.
This behavior I expected even with TD.
In the example therefore, only one accelerator is assigned to make it a comprehensible way.
Each accelerator is assigned only once.

Mike Vandine

Re: TD-22644: SalRibbonSetItemAccelerator does not work properly

Post by Mike Vandine » 16 Jan 2016, 00:00

Thanks for the example. That clarifies for me what you are after and where we are missing out.

I will log a defect.

Best regards,

Mike Vandine

Re: TD-22644: SalRibbonSetItemAccelerator does not work properly

Post by Mike Vandine » 21 Jan 2016, 05:39

Hi,

I have logged defect TD-22644 for this issue.

Best regards,

Return to “Bug Reports”

Who is online

Users browsing this forum: [Ccbot] and 0 guests