Altering Line Numbers

Questions on using RSyntaxTextArea should go here.

Moderator: robert

Altering Line Numbers

Postby Azlan » Mon May 06, 2013 9:18 pm

Is there any way that you would be able to grab the line numbers? Like, change the background color and the foreground color?
Thanks in advance.

Also, answer my other question, please: http://fifesoft.com/forum/viewtopic.php?f=4&t=759&p=2080&hilit=autocomplete#p2080
Azlan
 
Posts: 14
Joined: Thu Apr 11, 2013 4:54 pm

Re: Altering Line Numbers

Postby robert » Tue May 07, 2013 3:43 am

The background color of the line number area always matches that of the RSyntaxTextArea it is providing line numbers for. To set the foreground color or font, grab the Gutter from the RTextScrollPane:

java code:

Gutter gutter = scrollPane.getGutter();
gutter.setLineNumberColor(Color.red);
gutter.setLineNumberFont(myFont);
gutter.setLineNumberingStartIndex(32);
User avatar
robert
 
Posts: 798
Joined: Sat May 10, 2008 5:16 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 4 guests

cron