Posted 15 years ago by karl - Senior Software Architect, Shelltools, LLC
Avatar
how can i delete say teh top 500 lines from a document?

basically i am implementing a console kind of output in this case, and once it gets over a certian amount of times, i want to clip off some of them..

also i noticed in the console situation, with the autoscrolling, it can get very slow and jerky when you are adding hundreds of lines in a loop.

Karl

Comments (1)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Karl,

You'd have to get the start offset of the document line... probably something like this...
int startOffset = editor.Document.Lines[499].StartOffset;
Then call the Document.UndoableDelete method to delete offset range 0 to startOffset.

We're trying to improve speed and memory usage in v4.0 so hopefully that will help.


Actipro Software Support

The latest build of this product (v21.1.0) was released 13 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.