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?
ADAdministrator Syncfusion Team September 7, 2004 07:53 PM
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))
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.
SGSteve GraddySeptember 9, 2004 05:14 AM
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.
ADAdministrator Syncfusion Team September 10, 2004 05:43 PM
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.