Highlight instances of found text

Mark Swindell mdswindell at cruzio.com
Sat Jul 4 01:54:33 EDT 2009


Something like this ought to work:

ON mouseUp
     REPEAT WITH x = 1 to the number of words in field 1
         IF word x of field 1 is theFoundWord THEN
             set the backgroundcolor of  word x of field 1 to yellow
         END IF
     END repeat
END mouseUp

hth,
Mark


On Jul 4, 2009, at 4:41 AM, Sivakatirswami wrote:

> Does anyone have a function that will highlight/colorize instances  
> of found text in a field?
>
> e.g. say we have a search function, user types "chapati"
>
> In the particular ebook I have, all instances (lines or paragraphs  
> containing) of "chapati" are "gathered" and then posted to a field  
> for review... I would like to have all instance of "chapati" in that  
> field be highlighted or colorized.
>
> I'm sure I can figure it out but someone I'm sure has already cooked  
> this dosai before and I'm a fan of using recipes.
>
> Thanks
> Sivakatirswami



More information about the use-livecode mailing list