Cursor will blink at end of the textbox after add the item from combobox

Posted by Agopi.net under C# on 7/21/2011 | Points: 10 | Views : 2435 | Status : [Member] | Replies : 1
Hi friends,

How to put the cursor at end of the selected items content from the listbox or combobox to textbox by programmatic.

EX: Item selected from combobox to textbox.

INDIA

i need the cursor at end of the "A" in the string of "INDIA "

By
Gopi A




Responses

Posted by: Hmanjarawala on: 8/5/2011 [Member] Bronze | Points: 25

Up
0
Down
Hi agopi,

here is the code:

txtBox.Text = lstBox.Text
txtBox.Focus()
txtBox.Select(txtBox.TextLength, txtBox.TextLength)

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Agopi.net, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response