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 regardsAndy
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.
I came across one problem. I added ultraToolbarsManager1 in one usecontrol and added another ultraToolbarsManager2 in another usercontrol. They both had one shotcut(ctrl+c), no matter where I press ctrl+c, it will excute the copy action in ultraToolbarsManager1. Do you know what's the problem and how can do copy action for ultraToolbarsManager2.
Hi Mike,
Thanks a lot for your help, it worked perfectly.
I really appreciate your support,best regardsAndy