Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
HotKeys with UltraComboEditor
posted

Greetings,

Is there a way to add HotKeys to a UltraComboEditor? e.g. CTRL+SHIFT+E and my combo's dropdown event is triggered.

 

Regards,

Parents
  • 69832
    Verified Answer
    Offline posted

    If you set the form's KeyPreview property to true, the control's OnKeyDown method will be called first regardless of which control has the input focus. You can then handle the keystroke and programmtically open the dropdown.

    Example:
    this.KeyPreview = true;

    protected override void OnKeyDown(KeyEventArgs e)
    {
        if ( (e.Modifiers & Keys.Control) == Keys.Control &&
             (e.Modifiers & Keys.Shift) == Keys.Shift &&
             (e.KeyCode & Keys.E) == Keys.E )
        {
            this.ultraComboEditor1.Select();
            this.ultraComboEditor1.Editor.DropDown();
        }
           
    }

Reply Children
No Data