Accelerator/Shortcut Keys Issue

3 posts, 1 answers
  1. Aaron
    Aaron avatar
    12 posts
    Member since:
    Mar 2012

    Posted 02 May 2012 Link to this post

    Hello, I just ran into this issue and it took me forever to figure it out. I figured I would post it here in the hopes of saving someone a headache.

    I have created a custom control that contains a RadRichTextBox and a RadCommandBar

    I dropped the custom control onto a new windows form along with several standard textboxes and labels

    I added accelerator characters to the labels of the text boxes "&Company", "&Employee".

    When I ran the form and began typing into the RadRichTextBox whenever I typed "c" or "e" (without pushing "Alt") the focus would move to the text boxes with the matching accelerator key.

    To get around this I needed to add the following override in the custom control.

            protected override bool ProcessDialogChar(char charCode)
                if ((Control.ModifierKeys & Keys.Alt) == Keys.None) return false;
                return base.ProcessDialogChar(charCode);

    Hope that helps!
  2. Answer
    Jack avatar
    2335 posts

    Posted 07 May 2012 Link to this post

    Hello Aaron,

    Thank you for sharing your solution with the community. I marked this as an issue and logged it in our issue tracking system. I have also updated your Telerik account for bringing this to our attention.

    If you need further assistance, I will be glad to help.
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
  3. DevCraft R3 2016 release webinar banner
  4. NORIS
    NORIS avatar
    29 posts
    Member since:
    Jun 2009

    Posted 05 Nov 2012 Link to this post

    Thank you, Aaron. Your code also resolved this issue for me.
    I voted for the fix.
Back to Top