Refresh MdiChild when LineModifcationMarkColor Changes

SyntaxEditor for Windows Forms Forum

Posted 19 years ago by Boyd - Sr. Software Developer, Patterson Consulting, LLC
Avatar
I have an MDI Application with SyntaxEditor being displayed in the MDIChild windows. When I save a document, I'm using the following command to change the line modification markers from yellow to lime:
editor.Document.ChangeLineModificationMarkColor(editor.Document.LineModificationMarkingColor, Color.Lime);
This code was copied directly from the C# sample application. The code works fine (no problems there), but SyntaxEditor doesn't redraw itself to indicate that the line modification markers are now a different color. I have to perform a 'Refresh' on SyntaxEditor to get it to redraw or else the colors will only change as I click through each line (and each individual line is repainted). This doesn't happen in the sample application, so I'm thinking it's only an issue with an MDI app.

Using 'Refresh' would be an OK work-around except that I might have two or more SyntaxEditor controls displaying the same Document (like using 'Windows -> New' in Visual Studio). If this is the case, the only editor that is redrawn will be the one that changed the colors and executes the 'Refresh' event. There's no event I'm aware of that I can listen to that will tell me when to refresh the SyntaxEditor control in the other windows that are displaying the same document.

Any ideas?

Comments (3)

Posted 19 years ago by painetraine
Avatar
I am having a similar issue except SyntaxEditor as a whole isn't redrawing. I have an MDI app with SyntaxEditor controls in each window and when I open a dialog "sometimes" and then close the dialog, the editor window is essentially blank and I have to minimize and maximize the main MDI window to get SE to redraw itself.

At first I thought it was locked up but I can keep typing and when I min/max, the text I typed is there.

It might be related to this issue?

Thanks
Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Boyd,

The next release now repaints all attached editors after a call to ChangeLineModificationMarkColor. The current one doesn't repaint any.

Painetraine,

Your issue is a different one. Can you make and email us a small project that can cause the behavior to occur?


Actipro Software Support

Posted 19 years ago by Boyd - Sr. Software Developer, Patterson Consulting, LLC
Avatar
Quote:
<font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Actipro Software Support:
The next release now repaints all attached editors after a call to ChangeLineModificationMarkColor.<HR>


Wonderful... thanks for the quick resolution!
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.