Wish Pass as a CharSequence parameter

Star-Dust

Expert
Licensed User
Longtime User
At the moment there is no Type CharSequence.
I would like to make a class method this way:

B4X:
Sub SetLabelText(Text As CharSequence)
    GeneralLabel.Text=Text
End Sub

This would allow different choices such as:
B4X:
SetLabelText("Hallo")
  
Dim Cs As CSBuilder
Cs.Initialize.Color(Colors.Blue).Underline.Append("Hallo").PopAll
SetLabelText(Cs)
  
Dim RS As RichString
RS.Initialize("Hallo")
RS.Color(Colors.Black,0,5)
SetLabelText(RS)

All three would be correct.
 

Star-Dust

Expert
Licensed User
Longtime User
Thank's. It Work
 
Top