Posted 20 years ago
by Boyd
-
Sr. Software Developer,
Patterson Consulting, LLC
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:
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?
editor.Document.ChangeLineModificationMarkColor(editor.Document.LineModificationMarkingColor, Color.Lime);
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?