iOS Question text replace

tufanv

Expert
Licensed User
Longtime User
Hello

For calculations not to fail, I use
B4X:
Sub txttry_TextChanged (OldText As String, NewText As String)

    NewText = NewText.Replace(",",".")

   
End Sub

while this fixes calculations problems because of the "," , the actual text is not changing the , to . I still see 432,5 when i type a value with coma.

How can i fix it ?

TY
 

narek adonts

Well-Known Member
Licensed User
Longtime User
Hello

For calculations not to fail, I use
B4X:
Sub txttry_TextChanged (OldText As String, NewText As String)

    NewText = NewText.Replace(",",".")

  
End Sub

while this fixes calculations problems because of the "," , the actual text is not changing the , to . I still see 432,5 when i type a value with coma.

How can i fix it ?

TY
try this

B4X:
Sub txttry_TextChanged (OldText As String, NewText As String)

    txttry.Text = NewText.Replace(",",".")

  
End Sub
 
Upvote 0
Top