The thing that emerges from my question is that to colour a word or phrase programmatically in a textField is a fiddly business and it would be nice (??????) if a simpler way to do this were introduced.

This works very well:

on mouseUp
   put 1 into VOCABLE
   repeat until word VOCABLE in fld "TEKST" is "finalSolution666"
      put VOCABLE into fld "KOUNT"
      if word VOCABLE of fld "TEKST" is "the" then
         set the textColor of word VOCABLE of fld "TEKST" to red
      end if
      add 1 to VOCABLE
   end repeat
end mouseUp


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.

Richmond.

_______________________________________________
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