I am working on a C # - Winforms application and trying to set the background color of a read-only text field ...
txtMyBox.BackColor = Color.FromName ("Red");
This is an error message with an error message ...
System.ArgumentException was unhandled
Message=Control does not support transparent background colors.
Source=System.Windows.Forms
First things first; is this the correct way to set the background color for a read-only text field? I do this a lot for regular text fields and it seems to work fine.
If so, can someone help me with what “transparent background color” is and why should I want it? I do not think I know; I just want the background to change color.
source
share