I have text data that needs to be displayed, probably in a table, to make formatting easier.
The data is such that various characters in each cell of the table are strings (or equivalent), which have different colors for some of the different characters. An example might be: "Jup/Sat =15/6.49-46 ( 6) -14.35-52", where the "49" is shown in red, while the rest is black or other colors.
The table would be something like this in the cells going across the row:
Column 0 Column 1 Column 2 Column 3
"Jup/Sat" "=" "15/6.49-46 ( 6)" "-14.35-52"
I can do this using EditText:
But this has been a nightmare to keep the formatting lined up for all the different rows of data present.
I have tried to use the TableView class, but I can't seem to get it to recognize colors using CSBuilder.
Can anyone suggest to me how to best approach this issue? Should I investigate BCTextEngine or RichString or some other library? Thank you.
The data is such that various characters in each cell of the table are strings (or equivalent), which have different colors for some of the different characters. An example might be: "Jup/Sat =15/6.49-46 ( 6) -14.35-52", where the "49" is shown in red, while the rest is black or other colors.
The table would be something like this in the cells going across the row:
Column 0 Column 1 Column 2 Column 3
"Jup/Sat" "=" "15/6.49-46 ( 6)" "-14.35-52"
I can do this using EditText:
Sample code:
t1 = "Jup/Sat =15/6."
cs.Color(Colors.Black).Append(t1)
cs.Pop
t2 = "49"
cs.Color(Colors.Red).Append(t2)
cs.Pop
t3 = "-46 ( 6) -14.35-52"
cs.Color(Colors.Black).Append(t3)
cs.PopAll
EditText1.Text = cs
B4X:
But this has been a nightmare to keep the formatting lined up for all the different rows of data present.
I have tried to use the TableView class, but I can't seem to get it to recognize colors using CSBuilder.
Can anyone suggest to me how to best approach this issue? Should I investigate BCTextEngine or RichString or some other library? Thank you.