B4J Question [Solved] How to add a string one after the other in the object TextArea?

XorAndOr

Active Member
Licensed User
Longtime User
Hello everyone,
I did research on the forum but I did not find (or I missed) on how to add a string by pressing a button one after the other in the textarea that can remain visible that sent previously attached one after the other without spaces
thank you
sorry google trad.

B4X:
Sub Button1_Click
    
    Dim str() As Byte
    
    str = TextField1.Text.GetBytes("UTF8")
    
    Astream.Write(str)    
        
    TextArea1.Text = BytesToString(str,0, str.Length, "UTF-8")    

End Sub


Sub TextArea1_TextChanged (Old As String, New As String)
    
    Log("old  " & Old)
    Log("new  " & New)
    
End Sub
 

JJ37

Member
B4X:
TextArea1.Text = ""
TextArea1.Text = TextArea1.Text & CRLF & BytesToString(str,0, str.Length, "UTF-8")
 
Last edited:
Upvote 0

jimmyF

Active Member
Licensed User
Longtime User
B4X:
Sub Button1_Click
    
    Dim str() As Byte
    
    str = TextField1.Text.GetBytes("UTF8")
    
    Astream.Write(str)   
        
    TextArea1.Text = TextArea1.Text & CRLF & BytesToString(str,0, str.Length, "UTF-8")   

End Sub
 
Upvote 0

jimmyF

Active Member
Licensed User
Longtime User
You're welcome. I posted before Jimmy but had to wait for moderator approval.
Ha ha! Usually I'm the slow one! :D
 
Upvote 0
Top