4 Answers, 1 is accepted
0
Hello Roland,
Please refer to the following section of our documentation. Since the shortcuts dialog does not allow single key (e.g. F3), you can set some key combination and then go in the Designer.cs file of your form where you can replace the key string with "F3".
Regards,
Nick
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Please refer to the following section of our documentation. Since the shortcuts dialog does not allow single key (e.g. F3), you can set some key combination and then go in the Designer.cs file of your form where you can replace the key string with "F3".
Regards,
Nick
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

Roland
Top achievements
Rank 1
answered on 04 Aug 2009, 02:15 PM
I tried that before posting here.
Does not work in the 2009.2.9.729. I am setting the command on the button.
Does not work in the 2009.2.9.729. I am setting the command on the button.
0
Accepted
Hello Roland,
Thank you for your bug report. I checked the commands with RadMenuItems and it seems that they work with them but do not work with RadButton. We will try to provide a fix in future.
What I can suggest currently is to use an IMessageFilter and PerformClick method:
You need to implement IMessageFilter in the following way:
The 0x100 message is WM_KEYDOWN and the 0x72 is the F3 key.
The last bit is to attach the filter:
I hope that this solution will work for you until we fix the Commands. Thank you very much for your patience.
Best wishes,
Nick
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Thank you for your bug report. I checked the commands with RadMenuItems and it seems that they work with them but do not work with RadButton. We will try to provide a fix in future.
What I can suggest currently is to use an IMessageFilter and PerformClick method:
this.radButton1.PerformClick(); |
You need to implement IMessageFilter in the following way:
public partial class Form5 : Form, IMessageFilter |
{ |
public Form5() |
{ |
InitializeComponent(); |
} |
#region IMessageFilter Members |
bool IMessageFilter.PreFilterMessage(ref Message m) |
{ |
if (m.Msg == 0x100 && m.WParam == new IntPtr(0x72)) |
{ |
this.radButton1.PerformClick(); |
return true; |
} |
return false; |
} |
#endregion |
private void radButton1_Click(object sender, EventArgs e) |
{ |
MessageBox.Show("Button1 clicked"); |
} |
} |
The 0x100 message is WM_KEYDOWN and the 0x72 is the F3 key.
The last bit is to attach the filter:
[STAThread] |
static void Main() |
{ |
Application.EnableVisualStyles(); |
Application.SetCompatibleTextRenderingDefault(false); |
Form5 form = new Form5(); |
Application.AddMessageFilter(form); |
Application.Run(form); |
} |
I hope that this solution will work for you until we fix the Commands. Thank you very much for your patience.
Best wishes,
Nick
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

Roland
Top achievements
Rank 1
answered on 05 Aug 2009, 02:00 PM
Thanks