Highlight Text in TextArea
SetSelection method of the TextArea is ued here to highlight the text. This method will work only if the TextArea has the focus or the “alwaysShowSelection” property of the TextArea’s textField is set to true. Since the textField is a private property, we need to extend the TextArea class and set the property inside the class.
This method is highlighting only one search term at a time. Regular expression can be used to highlight multiple matching terms
Click here or on the image to view the example . Right click to view the source

great….! this is almost same what I had been looking for. Code, too, seems simple.
Harit
October 30, 2008 at 6:55 am