This is a migrated thread and some comments may be shown as answers.

AutoCompleteBox: Keypress simulating alt and letter

3 Answers 69 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 17 May 2013, 03:25 PM
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

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 22 May 2013, 04:55 PM
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?
0
John
Top achievements
Rank 1
answered on 22 May 2013, 06:15 PM
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
0
Peter
Telerik team
answered on 27 May 2013, 12:44 PM
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?
Tags
AutoCompleteBox
Asked by
John
Top achievements
Rank 1
Answers by
Peter
Telerik team
John
Top achievements
Rank 1
Share this question
or