Hightlight a textarea?

BlitzMax Forums/BlitzMax GUI Programming/Hightlight a textarea?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

AS far as I remember you have to reset the Format after you have formatted a piece of the text.
eg: FormatTextAreaText(scriptEditTA,0,0,0,0,lp+1,1)

Also just 3 things I have noticed:
I don't know how much keywords you have, but it may be faster to switch to TMaps instead of using arrays. The main advantage is you are able to add the heyword and maybe a keyword type which stores color,format and other things. So you can have different keywordstyles easily.
The other thing, you should get rid of the While loop. Try something like FormatTextAreaText(...,...,...,...,...,lp,KeyWords[i].length)
Also try to avoid to update the whole text at once. Use the hooks and after an inital load, you should only update on a perline basis.

I have some highlighter code flying around here, if you're interrested I can upload it.