Douglas Farias Expert Licensed User Longtime User Oct 23, 2014 #1 hi all how can i get a current text length ? for example , i have a text with 4000 chars at one edittext i m on 2222 for example, how to get this value? i need this because i m need edit some lines and later press a button, when i press a button edittext.text change and the cursor back to length = 0 and not the last edited text line 2222 how can i make this? save the current length number?
hi all how can i get a current text length ? for example , i have a text with 4000 chars at one edittext i m on 2222 for example, how to get this value? i need this because i m need edit some lines and later press a button, when i press a button edittext.text change and the cursor back to length = 0 and not the last edited text line 2222 how can i make this? save the current length number?
M Mahares Expert Licensed User Longtime User Oct 23, 2014 #2 Have you thought about edittext.selectionStart: Code: Sub txtTest_TextChanged (Old As String, New As String) Dim cposition As Int cposition=txtTest.SelectionStart Log(cposition) End Sub or Code: Sub txttest_EnterPressed Dim cposition As Int cposition=txtTest.SelectionStart Log(cposition) End Sub Upvote 0
Have you thought about edittext.selectionStart: Code: Sub txtTest_TextChanged (Old As String, New As String) Dim cposition As Int cposition=txtTest.SelectionStart Log(cposition) End Sub or Code: Sub txttest_EnterPressed Dim cposition As Int cposition=txtTest.SelectionStart Log(cposition) End Sub