Disabled appearance of SyntaxEditor

SyntaxEditor for Windows Forms Forum

The latest build of this product (v2020.1 build 0402) was released 2 months ago, which was before this thread was created.
Posted 2 months ago by Alex Sche
Version: 20.1.0402
Platform: .NET 4.5
Environment: Windows 10 (64-bit)
Avatar

Hello, I've got a new issue  - when I set Enabled propertry of SyntaxEditor to false the editor doesn't change his appearance. It looks as enabled control.

Is there a way to change the appearance for disabled state of SyntaxEditor?

Comments (1)

Answer - Posted 2 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Alex,

You could set the control's BackColor to another color when it's disabled.  However when testing that just now, I noticed it wasn't kicking off a repaint.  So you'd have to do this until the next build, after which you can remove the Invalidate() call:

editor.Enabled = false;
editor.BackColor = Color.Silver;
editor.Invalidate();

The BackColor should be Color.Empty when you want it to use the default coloring set up via highlighting styles.


Actipro Software Support

Add Comment

Please log in to a validated account to post comments.