Changing HighlightingStyle colors at runtime

SyntaxEditor for Windows Forms Forum

Posted 20 years ago by painetraine
Avatar
I am attempting to change the ForeColor property of a highlighting style at runtime and it doesn't seem to change the text in the editor to the new color.

I basically do

foreach (HighlightingStyle style in editor.Language.HighlightingStyles)
{
style.ForeColor = getColor(style.Key);
}

However, the text in the editor stays the original color. Is there anything I have to do in addition to the above to make the style change occur?

Thanks

Comments (1)

Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes there is some internal caching being done. So look at the sample application's Style Editor form. You should set editor.Language.IsUpdating to true before changing colors and set it to false after.


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.