Accessing RadMenuItem in MDI Child Form with Alt Key

2 posts, 0 answers
  1. Meaning Of Lights
    Meaning Of Lights avatar
    24 posts
    Member since:
    Dec 2007

    Posted 22 Jan 2014 Link to this post


    I have a MDI Winform application that has menus on the parent form and also on the child forms.

    The Child Form has menus such as: &File, &Edit and I would like these child form menu's to get focus when users press eg:

    Alt + F or Alt + E

    Unfortunately pressing the Alt key always gives focus to the Parent Form menu's.

    How can I make the Alt key give focus to the Active Child Forms menu?
  2. George
    George avatar
    500 posts

    Posted 27 Jan 2014 Link to this post

    Hello Jeremy,

    Thank you for contacting us.

    I can confirm this issue, I have added it to our Feedback Portal. You can find it on the following url: FIX. RadMenu - When RadMenu is added to a MDI child Form only the main RadMenu is accessible through shortcuts with Alt Key.

    As a workaround you can subscribe to the KeyUp event of every child form and click the menu items manually:
    private void childForm_KeyUp(object sender, KeyEventArgs e)
        Form form = sender as Form;
        if (!form.Focused)
        RadMenu menu = null;
        foreach (Control control in form.Controls)
            if (control is RadMenu)
                menu = control as RadMenu;
        if ((Control.ModifierKeys & Keys.Alt) == Keys.Alt && menu != null)
            foreach (RadItem item in menu.Items)
                int ampersantIndex = item.Text.IndexOf("&");
                if (ampersantIndex != -1)
                    char hotkeyChar = item.Text[ampersantIndex + 1];
                    if (char.ToLower(hotkeyChar) == char.ToLower((char)e.KeyValue))

    I have also updated your Telerik Points for reporting this.

    I hope this helps.

    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft R3 2016 release webinar banner
Back to Top