Programmatically updating text

SyntaxEditor for Windows Forms Forum

Posted 20 years ago by Marianne
Avatar
When a user saves, I am programmatically inserting/modifying text into a collapsed region. When this happens the outlined node expands, the changes are made, and the node recollapses. The cursor is also placed at the position where the changes were made, back at the outlining node text.

Since I'd rather not have the script jump to that location when a user saves, I need to find a way to make these changes without disrupting the user. What I'd like to do is suspend the control from repainting while these edits are going on, then put the cursor back to where it was and refresh the screen, so that from the user's perspective, nothing is jumping around.

Before I get too far into this, would just like to know the easiest way to go about it. Thanks.

------------------------------- Marianne

Comments (1)

Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Marianne,

You can use the SyntaxEditor.SuspendPainting() method before and SyntaxEditor.ResumePainting() method after to stop intermittant painting.


Actipro Software Support

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.