Star-Dust Expert Licensed User Longtime User Feb 7, 2018 #1 At the moment there is no Type CharSequence. I would like to make a class method this way: Code: Copy Sub SetLabelText(Text As CharSequence) GeneralLabel.Text=Text End Sub This would allow different choices such as: Code: Copy 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.
At the moment there is no Type CharSequence. I would like to make a class method this way: Code: Copy Sub SetLabelText(Text As CharSequence) GeneralLabel.Text=Text End Sub This would allow different choices such as: Code: Copy 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.
Erel B4X founder Staff member Licensed User Longtime User Feb 7, 2018 #2 Set the type to Object. It will work with all three.