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=" &quote& "#FF0000"&quote&">finalSolution666</font>" in it
set the htmltext of fld "what" to it

--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to