Code: Select all
set the backgroundcolor of char X to Y of fld "Z" to "color"
So I create a fld "txt" and then in the Message Box I run:
Code: Select all
set the htmltext of fld "txt" to "<span metadata='1'>Lorem</span> <span metadata='2'>ipsum</span> <span metadata='3'>dolor</span> <span metadata='4'>sic</span> <span metadata='5'>mit</span>"
Then I run:
Code: Select all
set the backgroundcolor of char 1 to -1 of fld "txt" to "green"
The exact same thing happens if I add the text to the field as simple (rather than html) text, and then programmatically add the metadata.
Code: Select all
set the metadata of word 1 of fld "txt" to "1"
set the metadata of word 2 of fld "txt" to "2"
...
This happens at every level below "line". If you say "set backgroundcolor of byte/char/word..." then there are always the stripes. If you use "line X" then the background of the entire line does change and there are no stripes. But I am looking to "highlight" words in sentences, not whole lines, so I am looking to set the background color at either the character or the word level.
I'm developing on Windows, but if I test it on Android, I see exactly the same thing. If anyone has any ideas of what's going on, I would love to hear them. Or if there is some other way that I can accomplish my goal of "highlighting" text by some mechanism other than "set the backgroundcolor...", that would be great as well.
Thanks all.
Jeff