Edit box focus
-
I have an edit box called Login. How do I set the focus on Login at THE END of the string currently in Login? calling Login.SetFocus sets the cursor at the beginning of the string. I want it at the end. Thank you, Red Sunday ----------------- http://www.zachcalvert.com
-
I have an edit box called Login. How do I set the focus on Login at THE END of the string currently in Login? calling Login.SetFocus sets the cursor at the beginning of the string. I want it at the end. Thank you, Red Sunday ----------------- http://www.zachcalvert.com
Try:
TextBox1.SelectionStart= TextBox1.Text.Length TextBox1.Focus()
-
I have an edit box called Login. How do I set the focus on Login at THE END of the string currently in Login? calling Login.SetFocus sets the cursor at the beginning of the string. I want it at the end. Thank you, Red Sunday ----------------- http://www.zachcalvert.com
-
Try this code:
With txtLogin .SelStart = 0 .SelLength = Len(.Text) .SetFocus End With
A thousand mile of journey, begin with the first step. APO-CEDC Save Children Norway-Cambodia Office
Hi First I'm sorry because I wrote the code for C# and not for VB.NET!:rolleyes:;P I think the code you wrote for answering Red's problem, that will also select the whole text of the textbox, is not what Red was looking to. The correction to your code (If my guess in the problem is correct) is this:
With txtLogin .SelLength = 0 .SelStart = len(.Text) .SetFocus End with
code> -
Hi First I'm sorry because I wrote the code for C# and not for VB.NET!:rolleyes:;P I think the code you wrote for answering Red's problem, that will also select the whole text of the textbox, is not what Red was looking to. The correction to your code (If my guess in the problem is correct) is this:
With txtLogin .SelLength = 0 .SelStart = len(.Text) .SetFocus End with
code>Oh, thank you very much for your information. Because I did not look the question carefully that make me confuse. Thank you very much that you correct my mistake :-O
A thousand mile of journey, begin with the first step. APO-CEDC Save Children Norway-Cambodia Office