this slowpoke moves

Clear StringGrid complete

// Beispiel 1 :
procedure TForm1.Button1Click(Sender: TObject);
var
  i, j : integer;
begin
  for i := StringGrid1.FixedCols to StringGrid1.ColCount - 1 do
  begin
    for j := StringGrid1.FixedRows to StringGrid1.RowCount - 1 do
    begin
      StringGrid1.Cells[i,j] := '';
    end;
  end;
end;

// Beispiel 2 :
procedure TForm1.Button2Click(Sender: TObject);
var
  i, k: Integer;
begin
  with StringGrid1 do
    for i := 0 to ColCount - 1 do
      for k := 0 to RowCount - 1 do
        Cells[i, k] := '';
end;

// Beispiel 3 :
procedure TForm1.Button3Click(Sender: TObject);
var
  I: Integer;
begin
  for I := 0 to StringGrid1.RowCount - 1 do
    StringGrid1.Rows[I].Clear();
end;

Keine Kommentare:

Kommentar veröffentlichen

Beliebte Posts

Translate