Posted 15 years ago by Cooldaddy - Novi, MI
Avatar
I am trying to write some codes that will automatic indent lines for VB.Net similar to VS. I notice that you have to functions called PositionToOffset and OffsetToPosition. There needs to another function called OffsetToLine, which would allow the user to find the line that the current token is on and get it indentations.

Comments (3)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
The Position structure gives you the line index. You can use that to get the DocumentLine and then use its GetTabStopLevel method.


Actipro Software Support

Posted 15 years ago by andy65 - UK
Avatar
So if this person wants to do auto indenting of ocde, why didn't you mention Indent Type Smart and the SmartIndent event?

Regards

Andy
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
SmartIndent only works when you are pressing RETURN and go to the next line. It lets you set the indent of the new line. It's not currently designed to format existing text.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.