I am probably doing this wrong, but I cannot seem to change the color of a word in the middle of a label used in ScrollingLabels (ScrollingText lib). The following produces all gray -- no red.
B4X:
' Build ScrollText from Work Orders ----------------------------------------------------
WOList.Initialize
WOMap.Initialize
SQLText = "SELECT * FROM wolist ORDER BY wrkordnbr DESC "
WOList = DBUtils.ExecuteMemoryTable(SQL1,SQLText,Null,0)
Dim i As Int = WOList.Size
If i = 0 Then Return
ScrollText = ""
Dim cs As CSBuilder
cs.Initialize
For i = 0 To WOList.Size - 1
WORecord = WOList.Get(i)
MapWORecord
ScrollText = cs.Color(Colors.Gray).Append(" WO " & WOMap.Get("wrkordnbr") & " ")
If s.Val(WOMap.Get("priority")) = 0 Then
ScrollText = cs.Color(Colors.Red).Append("URGENT ") ' does not work
End If
ScrollText = cs.Append(WOMap.Get("servsitename"))
Next
ScrollText = cs.Append("").PopAll
' Start Scrolling ----------------------------------------------------------------------
Greeting.Visible = False
Dim ScrollingLabels As ScrollingText
Dim slGreeting As Label
ScrollingLabels.Initialize
slGreeting.Initialize("")
' slGreeting.TextColor = Colors.Gray
slGreeting.TextSize = 20
Activity.AddView(slGreeting,20dip,10dip,570dip,50dip)
ScrollingLabels.StartScrolling(slGreeting,ScrollText,True,2,Null,Colors.RGB(248,248,255))