Indentation problem

Questions on using RSyntaxTextArea should go here.

Moderator: robert

Indentation problem

Postby _joshua_ » Sat Jul 12, 2014 6:43 pm

I'm using this great component but I have a problem.

When I put into a RSyntaxTextArea component a long text with setText, i.e., one taken from a file like this:

int main(void)
int x = 10;
int y = 11;

it's not indented.

I'd like it could be formatted as:

Code: Select all
int main(void)
     int x = 10;
     int y = 11;

Reading the API I didn't see any method that can do that.
For example setIndentAt, etc.

Any suggestion?


I have used ta.setAutoIndentEnabled(true) but with no effect.
Posts: 1
Joined: Sat Jul 12, 2014 6:35 pm

Re: Indentation problem

Postby robert » Fri Jul 18, 2014 2:06 am

Automatic indentation does not do anything to pasted text that contains newlines. If you would like to see this in a future release, please add a Feature Request on GitHub.
User avatar
Posts: 852
Joined: Sat May 10, 2008 5:16 pm

Return to Help

Who is online

Users browsing this forum: No registered users and 1 guest