Customizing line number start value

Questions on using RSyntaxTextArea should go here.

Moderator: robert

Customizing line number start value

Postby ramesh » Wed Jun 24, 2009 10:40 am

Hi,

Is it possible to customize line number start value? Something like instead of starting the line numbers from 1 I want it to start from 4.

Thanks,
Ramesh
ramesh
 
Posts: 7
Joined: Wed Jun 24, 2009 9:53 am

Re: Customizing line number start value

Postby robert » Thu Jun 25, 2009 12:45 pm

This currently isn't possible, but is really easy to add so I'll put it into the next release. I'll be busy the next 2 weeks though, so if I don't get to it early next week it'll have to be the week after.

I've added a tracker on SourceForge just so I don't forget about it.

Thanks!
User avatar
robert
 
Posts: 797
Joined: Sat May 10, 2008 5:16 pm

Re: Customizing line number start value

Postby robert » Mon Jun 29, 2009 2:58 am

FYI, the changes for this have been committed to SVN, revision 109.

The following code will make the first line displayed be numbered "5":

Code: Select all
RTextScrollPane sp = new RTextScrollPane(...);
Gutter gutter = sp.getGutter();
gutter.setLineNumberingStartIndex(5);


Let me know if there are problems. Otherwise, it'll be in the next release.
User avatar
robert
 
Posts: 797
Joined: Sat May 10, 2008 5:16 pm

Re: Customizing line number start value

Postby ramesh » Mon Jun 29, 2009 1:11 pm

Thanks Robert.

I haven't tried this yet, but I will let you know once I try that one.

Ramesh S
ramesh
 
Posts: 7
Joined: Wed Jun 24, 2009 9:53 am

Re: Customizing line number start value

Postby ramesh » Mon Jul 13, 2009 11:14 am

:D It is working nicely..Thanks!
ramesh
 
Posts: 7
Joined: Wed Jun 24, 2009 9:53 am


Return to Help

Who is online

Users browsing this forum: No registered users and 4 guests

cron