CB
Clay Burch
Syncfusion Team
June 1, 2002 07:45 PM UTC
For readonly, if you set the BackColor AFTER you set the ReadOnly property, then the cell will not look gray.
For Enabled = False, setting the BackColor will not get rid of the gray text, but will take care of the gray background.
For a disabled cell, if you really need to control the forecolor (& not just the backcolor), then one way to do this is to derive your own TextBox, override OnPaint and draw the text yourself using the paintevent arg passed in. This is doable, and works. You have to set the control's style to UserPaint with SetStyle in the constructor.