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.
latusaki
 

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...
textArea.removeAllLineHighlights();
User avatar
robert
 
Posts: 788
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 !
latusaki
 


Return to Help

Who is online

Users browsing this forum: No registered users and 1 guest