hatte nur den Code kopiert und Col/Row in vCol/vRow geäandert.
Richtiger wäre
Delphi-Quellcode:
...
With Grid Do
For vCol := FixedCols To pred(ColCount) Do
Begin
len := 20; // min. Breite
For vRow := FixedRows To pred(RowCount) Do
If len < Canvas.TextWidth(Cells[vRow, vCol]) + GridLineWidth + 4 Then
len := Canvas.TextWidth(Cells[vRow, vCol]) + GridLineWidth + 4;
ColWidths[vCol] := len;
End;
...