We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Keyboard Shortcuts

Thread ID:





27843 Apr 19,2005 02:32 PM UTC Apr 22,2005 09:40 PM UTC General Discussion 1
Tags: General Discussion
Administrator [Syncfusion]
Asked On April 19, 2005 02:32 PM UTC

What is the proper way to turn off the keyboard shortcuts. What is happenening is that I open an edit box, but the shortcuts on the current menu are still active, so if the user presses delete, not only does the text delete, but the menu choice for delete also fires.

Administrator [Syncfusion]
Replied On April 22, 2005 09:40 PM UTC

Hi Steve, Thanks for your feedback on this issue. This is a known shortcoming in the .NET framework and this is how the .NET MainMenu behaves too. To workaround this problem, handle the edit box (RichTextBox has been used in this sample) GotFocus and LostFocus events to set or reset the corresponding BarItem''s Shortcut. private void richTextBox1_GotFocus (object sender, EventArgs e) { this.barItem3.Shortcut = Shortcut.None; } private void richTextBox1_LostFocus (object sender, EventArgs e) { this.barItem3.Shortcut = Shortcut.Del; } The test sample attached here illustrates this workaround. As long as the RichTextBox has focus the Shortcut is disabled, and hence the delete key has the desired effect on the RichTextBox. If you tab out of the RichTextBox such that the Button has focus, Delete shortcut gets reassigned and pressing the Delete key will fire the Click event of the BarItem. Please refer to it and let me know if this works for you. Regards, Guru Patwal Syncfusion, Inc.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon