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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Non-Standard Menu Item Shortcut

Thread ID:





18637 Sep 5,2004 02:32 PM UTC Sep 10,2004 10:43 PM UTC WinForms 3
Tags: Tools
Steve Graddy
Asked On September 5, 2004 02:32 PM UTC

I have a Syncfusion menu item that I want to assign a shortcut key combination of the Alt key and the Break key (Alt+Break). This is not a choice from the Syncfusion Shortcut key enumeration list. So how do you assign a key combination that is not listed in the standard listing?

Administrator [Syncfusion]
Replied On September 8, 2004 12:53 AM UTC

Hi Orgbrat, I am afraid, there is no way of assigning a non-conventional key combination as a ShortCut to the BarItem. However, as a workaround you could override the host form''s ProcessCmdKey method as shown in the code below : protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == (Keys.Alt|Keys.Pause)) { this.barItem2.PerformClick(); } return base.ProcessCmdKey (ref msg, keyData); } Please refer to the test sample attached here that illustrates this here and let me know if this works for you. Thanks for choosing Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Steve Graddy
Replied On September 9, 2004 10:14 AM UTC

Hi Guru, Thanks for the sample. I had already thought of that because I was already doing the same thing for the delete key to work around another problem. The problem now is setting the shortcut key text on the menu item to "Alt+Break". Without the shortcut key enumerator set on the bar item, even if the shortcut text is set the menu item displays no text ( blank ). Have you any suggestions for this problem. Steve Graddy

Administrator [Syncfusion]
Replied On September 10, 2004 10:43 PM UTC

Hi Orgbrat, Thanks for the update. You could set the BarItem''s Text property to include the shortcut string as well. This way you would not have to set the ShortCutText. Please refer to the modified sample that illustrates this 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

Live Chat Icon For mobile
Live Chat Icon