Posted 20 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 20 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 20 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 20 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 (v24.1.1) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.