RadTextBox.Focus()

2 posts, 0 answers
  1. Jeremy Murtishaw
    Jeremy Murtishaw avatar
    86 posts
    Member since:
    Apr 2009

    Posted 29 Jun 2009 Link to this post

    Hello Telerik support,

    I realize this was discussed on this forum back in June '07, but didn't reach a conclusion.  I'm trying to simply set input focus to a radTextBox like so:

    private

    void Form_Load(object sender, EventArgs e)

     

    {
        this.radTextBox.Focus();

    }

    The cursor does not get set onto the radTextBox.  What needs to be done here?


    Thanks!
    Jeremy

  2. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 02 Jul 2009 Link to this post

    Hi Jeremy Murtishaw,

    In order to set the focus to a RadTextBox when the form is loaded, please call its Select() method:

    private void Form_Load(object sender, EventArgs e)   
    {  
        this.radTextBox.Select();  


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

    Regards,

    Nikolay
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top