AutoCompleteBox: Keypress simulating alt and letter

4 posts, 0 answers
  1. John
    John avatar
    14 posts
    Member since:
    Apr 2013

    Posted 17 May 2013 Link to this post

    Telerik,

    I am using a few different control suites and am experiencing the following behavior with the RadAutoCompleteBox and a winforms button control.

    Steps to reproduce.

    1) Drop a RadAutoCompleteBox control on a form.
    2) Drop a regular windows form button on the same form.
    3) Have the text of the button be &Save and add a message box behind the button.
    4) Run the application and press s in the radautocompletebox.

    You will notice that the message box is being called.  One of the other control toolkits that we are using is inheriting  the windows controls.  This behavior does not happen when a RadButton is used.  However, this is not a acceptable workaround for us.

    Thanks
  2. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 22 May 2013 Link to this post

    Hi John,

    We are aware of this and we will address it in our upcoming release Q2 2013 scheduled for mid-June.
    For you version you can inherit RadAutoCompleteBox and override the ProcessDialogChar method:

    public class MyAutoCompleteBox : Telerik.WinControls.UI.RadAutoCompleteBox
    {
        public override string ThemeClassName
        {
            get
            {
                return typeof(Telerik.WinControls.UI.RadAutoCompleteBox).FullName;
            }
            set{}
        }
     
        protected override bool ProcessDialogChar(char charCode)
        {
            Keys modifierKeys = Control.ModifierKeys;
     
            if ((modifierKeys & Keys.Alt) == Keys.Alt || (modifierKeys & Keys.Control) == Keys.Control)
            {
                return base.ProcessDialogChar(charCode);
            }
     
            return false;
        }
    }

    I hope this helps. Regards,
    Peter
    Telerik
    RadChart for WinForms is obsolete. Now what?
  3. UI for WinForms is Visual Studio 2017 Ready
  4. John
    John avatar
    14 posts
    Member since:
    Apr 2013

    Posted 22 May 2013 Link to this post

    Peter,

    Thanks for the solution.  This has fixed the alt problem.  I now have 2 outstanding questions that rely on using an inherited RadAutoCompleteBox control.  The overrides to the ThemeClassName does not seem to be enough to allow me to use a different theme for the RadAutoCompleteBox control.

    In my last response on this forum post, I talk about the theme issue.

    http://www.telerik.com/community/forums/winforms/editors/autocompletebox-change-casing-on-createtextblock.aspx

    Thanks
  5. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 27 May 2013 Link to this post

    Hello John,

    I was able to apply the theme using the ThemeClassName, and this is the way in which themes resolve our controls. Please refer to attached video from my side.

    As I mentioned in your other ticket please, sending a sample application to us that demonstrates the case will allow us to assist you further.

    I am looking forward to your reply.

    Regards,
    Peter
    Telerik
    RadChart for WinForms is obsolete. Now what?
Back to Top