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

RadTextBox focus issue

1 Answer 83 Views
TextBox
This is a migrated thread and some comments may be shown as answers.
Selvamani
Top achievements
Rank 1
Selvamani asked on 11 Nov 2011, 09:05 AM
Hi,    
    
        i created an sample application with rad textbox and set autoscroll property to true. i have a list box with some data wheni click the data present in the list  will be added to the textbox . when i keep on adding in this way i am unable to see the focus of the data in the text box .

 i need to scroll down to see the last added data from the list.

how to set the focus to textbox on the currently added data instead scroll down and see.

i have attached two images please refer it.

please provide me a suggestion on this.


Regards,
Selva
        
        

1 Answer, 1 is accepted

Sort by
0
Accepted
Ivan Petrov
Telerik team
answered on 15 Nov 2011, 02:24 PM
Hi Selvamani,

Thank you for writing.

You can execute the following line of code each time you add text to the RadTextBox and it will scroll the control to the last visible row of text:

this.radTextBox1.SelectionStart = this.radTextBox1.Text.Length;
this.radTextBox1.ScrollToCaret();

I would like to remind you that you are not entitled to using our support services. In case you want to receive further support from us, please ask the purchase holder to add you as a license developer to the purchase.
Greetings,
Ivan Petrov
the Telerik team

Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

Tags
TextBox
Asked by
Selvamani
Top achievements
Rank 1
Answers by
Ivan Petrov
Telerik team
Share this question
or