Colouring words
J. Landman Gay
jacque at hyperactivesw.com
Mon Aug 10 14:34:59 EDT 2015
On 8/10/2015 12:39 PM, Richmond wrote:
>
> but, because one cannot set the textColor of a word in a stringVariable
> it is very slow with large texts because it has to work within the field.
That's why I usually use the html suggestion that Mark S. provided.
After getting the htmltext of the field, you can replace all instances
of the target word with color tags in one line of code. Then set the
htmltext of the field to the resulting value of the variable:
get the htmltext of fld "what"
replace "finalSolution666" with "<font color=" "e&
"#FF0000""e&">finalSolution666</font>" in it
set the htmltext of fld "what" to it
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list