procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); var s:string; begin with StringGrid1 do begin Canvas.FillRect(Rect); s:='fff'; DrawText(Canvas.Handle,PChar(s),Length(s),Rect,DT_RIGHT or DT_SINGLELINE or DT_VCENTER); end; end;
Rect: TRect; State: TGridDrawState);
var
s:string;
begin
with StringGrid1 do
begin
Canvas.FillRect(Rect);
s:='fff';
DrawText(Canvas.Handle,PChar(s),Length(s),Rect,DT_RIGHT or DT_SINGLELINE or DT_VCENTER);
end;
end;