I took the below example and it is doing bold font and the postfix but not the color red - why?
This drives me nuts.
Actually I have a field that can have 1, 2, 3. I want the 1 and the 2 to become a different color. 3 should stay black.
Would that work at all? If yes how?
This drives me nuts.
Actually I have a field that can have 1, 2, 3. I want the 1 and the 2 to become a different color. 3 should stay black.
Would that work at all? If yes how?
B4X:
Sub CreateCustomFormat (c As B4XTableColumn)
Dim Formatter As B4XFormatter
Formatter.Initialize
c.Formatter = Formatter
Dim Positive As B4XFormatData = c.Formatter.NewFormatData
Positive.TextColor = B4XTable1.TextColor
Positive.FormatFont = xui.CreateDefaultFont(16)
c.Formatter.AddFormatData(Positive, 1, c.Formatter.MAX_VALUE, True) 'Inclusive (zero included) 'c.formatter.max_value
Dim Negative As B4XFormatData = c.Formatter.CopyFormatData(Positive)
Negative.TextColor = xui.Color_Red
Negative.FormatFont = xui.CreateDefaultBoldFont(16)
Negative.Prefix = ""
Negative.Postfix = " !"
c.Formatter.AddFormatData(Negative,c.Formatter.MIN_VALUE, 3, False)
End Sub