[QScintilla] higlight all chosen words

Phil Thompson phil at riverbankcomputing.com
Tue Feb 24 08:51:45 GMT 2009


On Tue, 24 Feb 2009 09:44:40 +0100, Petr Vanek <petr at scribus.info> wrote:
> hi all,
> 
> is there any way how to highlight all occurences of e.g. searched
> words in Qscintilla widget?

Not in the "high-level" API.

> Example: User is searching for word "foo" in custom search&replace
> dialog. So I call findFirst()/findNext() mechanism as it's required.
> But I want to have highlighted all occurences of searched term e.g.
> with background color.
> 
> Is there any quick way how to do it or should I write it myself with
> setSelectionBackgroundColor()/resetSelectionBackgroundColor() in loop?

I don't see how that would work.

Have a look at "Modern Indicators"...

http://scintilla.sourceforge.net/ScintillaDoc.html#Indicators

Phil


More information about the QScintilla mailing list