- Brian Marshall
- PowerBuilder
- Monday, 21 October 2024 01:49 PM UTC
PB 2022 R3
We replaced our menu with a ribbonbar control on the window. When we disable a button it cannot be clicked, which is the behavior we want. However, if there is a shortcut defined for the button, the ribbon bar on the first open window is controlling if the shortcut fires the event associated with the ribbon bar item on any other open window that the user is currently working with.
For example we have two windows open. The first window opened has a RibbonLargeButtonItem with enabled=false. The second window we opened has a ribbon bar with the same button with enabled = true. Clicking the button on the first window does nothing, clicking the same button on the second window executes our code. This works as expected.
In the same scenario when we are on either window the shortcut we have defined for the RibbonLargeButtonItem does not execute our code. We can get the shortcut to work on the second window if we close the first window. When we get the parent window when using a shortcut, it returns the first window we opened. When using clicking the button, the parent window is the window with the ribbon bar item they clicked.
Our expectation was that the shortcut would behave the same way as the user clicking the ribbon bar item.
Any help would be appreciated.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.