Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1475
Ultra Win ToolBar & Short Cut
posted

Hi All-

I have a windows form having a ultra win toolbars manager having four ribbon tabs on it. Based on the mode user selected I will hide some of the ribbons and thereby tools on that ribbon. These tools are provided with short cuts by setting short cut key in Shared Props.

My problem is if the user hits a short cut key for a tool that is not visible there should be a check before hitting the funcitonality. So i wrote a little code in the tool click action which checks if that tool's ribbon is visible then go and execute the functionality otherwise return.

Question is which event will be the right place to add this functionality to check if it is valid tool or not. Some how i am not able to accept the fact that the tool click function is the right place to do that since this function will be called for the tool button click action also(i mean the user manually click on the tool).

Any info on this will help.

Thanks!

-swetha.

  • 44743
    Suggested Answer
    posted

    You can still do your check in the ToolClick handler. If you do find that your tool is hidden, there is really no way it could have been clicked by the user anyway, so it must have been clicked with a shortcut. However, if you are looking for an earlier sync point, you can handle the BeforeShortcutKeyProcessed event.