B4J Question ABMINPUT which library?

ViMeAv ICT

Member
Licensed User
Longtime User
I have to check currency and because selectionstart is only read-only i will try this with abminput.
But which library do i have to use for abminput?
 

ViMeAv ICT

Member
Licensed User
Longtime User
You need to use
B4X:
textfield1.SetSelection(0,15)
to set the selection.
solved:

check currency:
Private Sub textfield10_TextChanged (Old As String, New As String)
 
    If textfield10.Text = "" Then
        Return
    Else
        Dim chrtolookat As String = textfield10.Text.CharAt(textfield10.Text.Length - 1)
        Select chrtolookat
            Case "0","1","2","3","4","5","6","7","8","9"
                Return
            Case "."
                If (Old.Contains(".") Or Old.Contains(",")) Then
                    textfield10.Text = textfield10.Text.SubString2(0,textfield10.Text.Length - 1)
                    textfield10.SetSelection(textfield10.Text.Length,textfield10.Text.Length)
                Else
                    Return
                End If
            Case ","
                If (Old.Contains(".") Or Old.Contains(",")) Then
                    textfield10.Text = textfield10.Text.SubString2(0,textfield10.Text.Length - 1)
                    textfield10.SetSelection(textfield10.Text.Length,textfield10.Text.Length)
                Else
                    Return
                End If
            Case Else
                textfield10.Text = textfield10.Text.SubString2(0,textfield10.Text.Length - 1)
                textfield10.SetSelection(textfield10.Text.Length,textfield10.Text.Length)
        End Select
    End If
   
End Sub

I found this code in older forum messages.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…