zattz
asked on
dbgrid colour of cell when editing
Hi
When I edit a cell on a grid it's background color is white. How do I change the background colour when editing?
When I edit a cell on a grid it's background color is white. How do I change the background colour when editing?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Excellent. Thanks a lot :)
procedure TForm1.DBGrid1DrawColumnCe
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if (gdFocused in State) and ((Sender as TDBGrid).DataSource.DataSe
begin
DBGrid1.Canvas.Font.Color:
DBGrid1.Canvas.Brush.Color
DBGrid1.DefaultDrawColumnC
end
else
DBGrid1.DefaultDrawColumnC
end;