Home / Community & Support / Knowledge Base / RadControls for WinForms / General and Installation / Applying chords/shortcuts on instances of RadControl

Applying chords/shortcuts on instances of RadControl

Article Info

Rating: Not rated

 

Article information

Article relates to

RadControls for WinForms

Created by

Dimitar Kapitanov, Telerik

Last modified

February 2, 2007

Last modified by

Dimitar Kapitanov, Telerik


HOW-TO
Apply chords/shortcuts on instances of RadControl
 
DESCRIPTION
A chord is an advanced version of shortcut, which allows using not only modifier keys and an alphanumeric, but multiple alphanumeric values. Example of a chord: Ctrl+Alt+K+K.
 
SOLUTION
We shall use the RadMenu as an example:

  1. First select the desired menu item in design time:
     

     
  2. Find the CommandBinding property in the property grid and click the ChordsMappings ellipsis (…). The following dialog will appear:
     

     
  3. There are four main activity zones in this dialog:
    • available commands – this is a list of all available commands applicable to this menu item will appear - in our case these are the Focus and the Action commands, both being default to the RadItem base class. The Focus command calls the Focus method of the item whereas the Action command invokes the Click method.
    • command description – this box shows additional information regarding the selected command
    • keyboard combination – using the text box and the three checkboxes , you can define a key combination to be associated with the selected command. Every time someone invokes the combination, the command will fire its Execute method.
    • command context – here you must specify the object or the command context, that the command will be applied to.
       
  4. Clicking the OK button will save and serialize the command, and in runtime the command will be available for invocation through the selected key combination.
     

Comments

There are no comments yet.
If you'd like to comment on this KB article, please, send us a Support Ticket.
Thank you!

Please Sign In to rate this article.