RadComboBox.Focus

2 posts, 0 answers
  1. Judy
    Judy avatar
    12 posts
    Member since:
    Apr 2008

    Posted 16 Dec 2008 Link to this post

    It seems no matter what I do, the RadCombBox will not receive focus with the following line of code (even when AllowShowFocusCues=True):

    RadComboBox.Focus

    It will however receive focus if I insert the following ridiculous line of code after the Focus:
    RadComboBox.Focus

    System.Windows.Forms.SendKeys.Send(

    "{TAB}")

    Am I missing something about the focus event on this control?  I should never have to use the SendKeys.

     

     

     

     

     

  2. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 18 Dec 2008 Link to this post

    Hello Judy,

    Thank you for the question.

    You are correct. If you call RadComboBox.Focus() in Form_Shown or at a later moment of the application cycle, you should be able to focus the textbox portion of the RadComboBox. However, currently we have an issue with this behavior. It will be addressed in one of our next versions.

    For the time being, in Q3 2008 SP1 it is enough to call RadComboBox.Select() which will focus the textbox portion.

    However, if you are using an older version of RadControls, please consider using the following code snippet:
    this.radComboBox1.ComboBoxElement.TextBoxElement.TextBoxItem.Focus(); 

    If you have additional questions, feel free to contact me.

    Kind regards,
    Nikolay
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top