Highlighting Multiple lines

Questions on using RSyntaxTextArea should go here.

Moderator: robert

Highlighting Multiple lines

Postby latusaki » Tue Feb 14, 2012 3:18 pm

Is it possible to highlight multiple lines on RSyntaxTextArea , similar to how selected line is highlighted (by RSyntaxHighlighter) but with different colour ?
I want to mark specific lines with red while keeping the default highlight on selected line . Using DefaultHighlighter does some of the work but not quite as good as RSyntaxHIghlighter.

Re: Highlighting Multiple lines

Postby robert » Thu Feb 16, 2012 3:41 am

Can you just use this?

Code: Select all
Object tag = textArea.addLineHighlight(int line, Color color);

Then if you want to remove the line highlight later:

Code: Select all
textArea.removeLineHighlight(Object tag);
// or...
User avatar
Posts: 852
Joined: Sat May 10, 2008 5:16 pm

Re: Highlighting Multiple lines

Postby latusaki » Fri Feb 17, 2012 10:50 am

Wonder how I missed that method...guess just to make my life harder ^^ Thanks a lot !

Return to Help

Who is online

Users browsing this forum: Google [Bot] and 2 guests