m.schonewille at economy-x-talk.com
Mon Aug 10 13:45:03 CEST 2015
It may not be as easy as you think:
repeat with x = 1 to number of words of line y of fld "What"
if word x of line y of fld "What" is "only" then
set the textColor of word x of line y of fld "What" to red
put the htmlText of fld "What" into myText
replace "only" with "<font color=" & quote & \
"red" & quote & ">only</font" in myText
set the htmlText of fld "What" to myText
Both approaches have advantages and disadvantages.
Economy-x-Talk Consulting and Software Engineering
Installer Maker for LiveCode:
Buy my new book "Programming LiveCode for the Real Beginner"
LiveCode on Facebook:
On 8/10/2015 13:39, Richmond wrote:
> what is wrong with this:
> if line 5 of fld "WHAT" contains "only" then
> set the textColor of "only" in line 5 of fld "WHAT" to red
> end if
> I would like to set certain phrases in a sentence to a different
> textColor to the other words . . .
> . . . should be dead easy.
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the use-livecode