Сменить цвет выделения в StringGrid

Previous  Top  Next

    
 

 

Code:

procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;

Rect: TRect; State: TGridDrawState);

const

SelectedColor = Clblue;

begin

if (state = [gdSelected]) then

   with TStringGrid(Sender), Canvas do

   begin

     Brush.Color := SelectedColor;

     FillRect(Rect);

     TextRect(Rect, Rect.Left + 2, Rect.Top + 2, Cells[aCol, aRow]);

   end;

end;

 

 

©Drkb::01055

http://delphiworld.narod.ru/

DelphiWorld 6.0