B4J Question Contents of Textarea

besoft

Active Member
Licensed User
Longtime User
Hallo,

I need advice how to read the contents of the textarea. Textarea contains information on four lines. This information I need in the four text fields.

thanks
 

JanPRO

Well-Known Member
Licensed User
Longtime User
Hi,

you have to split the text:

B4X:
    Dim Lines() As String = Regex.Split(CRLF,TextArea1.text)
   
    If Lines.Length = 4 Then
         TextField1.Text = Lines(0)
        TextField2.Text = Lines(1)
        TextField3.Text = Lines(2)
        TextField4.Text = Lines(3)
    Else
        Log("Text invalid")
    End If

Jan
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…