salut Abda,
voici un petit bout de reponse à ta question :
procedure TForm1.StringGridDblClick(Sender: TObject); var iRow : integer; iCol : integer; iWidth : integer; begin for iCol := 0 to StringGrid.ColCount - 1 do begin iWidth := 0;
for iRow := 0 to StringGrid.RowCount - 1 do begin if StringGrid.Canvas.TextWidth(StringGrid.Cells[iCol,iRow]) > iWidth then iWidth := StringGrid.Canvas.TextWidth(StringGrid.Cells[iCol,iRow]); end;
StringGrid.ColWidths[iCol] := iWidth + 5; end; end;
reste plus qu'a ameliorer le code faire exactement ce que tu veux !
loulibier
|