Changing text in formatted field

Sarah Reichelt sarah.reichelt at gmail.com
Wed Aug 20 19:25:32 EDT 2008


On Thu, Aug 21, 2008 at 9:14 AM, Shari <shari at gypsyware.com> wrote:
> If I've got a field with nicely formatted text, some bold, some underlined,
> etc., is there a way from within a script to change a word in that field
> without losing the formatting?

Untested, but how about storing the textStyle, changing the word, then
re-setting the styles.

e.g.

put the textStyle of word 3 of fld "Formatted" into tStyle
put "new" into fld "Formatted"
set the textStyle of word 3 of fld "Formatted" to tStyle

Cheers,
Sarah



More information about the use-livecode mailing list