problem with undo when using DocumentLine.BackColor for tracking document modifications

SyntaxEditor for Windows Forms Forum

Posted 6 years ago by JuniorJo
Version: 12.1.0303
Avatar

Dear support,

evaluating the syntaxeditor, I ran into following situation:

After loading a document, I set a different background color for all lines in the document.

Now I add a new line with the carret at the line start, by pressing the enter/return-button.

A new document line is inserted before, what was, our current line (with a default background color: white)

Our former current line is directly behind the inserted line (having still a different background color: let's say wheat).

Pressing ctrl+z to undo the insert of the new line, does revert the new line insertion, but leaving the BackColor-Property white for, what was, our new line !

Adding a new line on a position greater than Startoffset, the BackColor-Property is restored correctly...

Is this an error or do I have problems understanding the concept of this editor? Any proposals how to get this done?

Many thanks in advance.

B.R.

Comments (1)

Answer - Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello, sorry but the document line background colors aren't very intelligent and you'd need to update them as appropriate based on document text change events.

Line indicators may track lines a bit better but those only let you put an icon in the indicator margin, not assign a background color to the line.  If that is an option perhaps you can try using them (an example is in the Indicators QuickStart).


Actipro Software Support

The latest build of this product (v2018.1 build 0341) 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.