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
2549
UltraToolbarsManager Shortcuts (copy/paste)
posted

Hi all,

I experienced the following problem when dealing with the ToolbarsManager in a usercontrol:

In a usercontrol I assigned shortcuts the tools that deal with cut/copy/paste (context-menu toolbar as described in the "how to" article).

Now the shortcuts seem to trap all such keypresses on the entire form, means that if I press CTRL+C (copy) or CTRL-V (paste) when focus is on a textbox on the form (not in the usercontrol) it doesnt work anymore.

Instead the action is always executed on the usercontrol.
That means that if I use PASTE in a textbox on a form, the paste command is executed in the textbox on the usercontrol that hosts the context-menu with the bound shortcuts.

How should I deal with this problem?

Looking foreward to your replies,
best regards
Andy

Parents
No Data
Reply
  • 44743
    Verified Answer
    posted

    Handle the UltraToolbarsManager.BeforeShortcutKeyProcessed event. When the event is fired for the copy or paste tools, check the ContainsFocus property of the UserControl. If it is False, set e.Cancel on the event args to True to prevent the shortcut from being processed.

Children