Android Question CSBuilder

Georgi

Member
Hi, how to change multiline text color? When adding new string, old one goes black. Edittext1 = Edittext1 & cs, dosent work.
 

Mahares

Expert
Licensed User
Longtime User
When adding new string, old one goes black. Edittext1 = Edittext1 & cs, dosent work.
You can combine (concatenate) 2 CSbuilders into one. Here is an example:
B4X:
Dim cs1, cs2, cs3 As CSBuilder
 Dim strvar As String ="Soccer is my passion"
 cs1.initialize.Color(Colors.Red).Append(strvar & CRLF).PopAll
 Dim strvar2 As String ="I miss it amid the pandemic"
 cs2.initialize.Color(Colors.Blue).Append(strvar2).PopAll
 cs3.Initialize.Append(cs1).Append(cs2).PopAll
 EditText1.Text=cs3
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…