With TStringGrid(Sender) do
begin
Canvas.FillRect(Rect);
InflateRect(Rect, -2, -2);
i := DrawText(Canvas.Handle, PChar(Cells[ACol, ARow]), -1,
Rect, DT_CALCRect or DT_EDITCONTROL or
DT_WORDBREAK );
if i > RowHeights[ARow] then RowHeights[ARow] := i + 4;
DrawText(Canvas.Handle, PChar(Cells[ACol, ARow]), -1, Rect,
DT_EDITCONTROL or DT_MODIFYSTRING or
DT_WORDBREAK);
end;
With TStringGrid(Sender) do
begin
Canvas.FillRect(Rect);
InflateRect(Rect, -2, -2);
i := DrawText(Canvas.Handle, PChar(Cells[ACol, ARow]), -1,
Rect, DT_CALCRect or DT_EDITCONTROL or
DT_WORDBREAK );
if i > RowHeights[ARow] then RowHeights[ARow] := i + 4;
DrawText(Canvas.Handle, PChar(Cells[ACol, ARow]), -1, Rect,
DT_EDITCONTROL or DT_MODIFYSTRING or
DT_WORDBREAK);
end;