Re: gegensatz zu rowcount
Hallo,
bis ich das dann geklärt hab mach ich es mal so: :mrgreen:
Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
begin StringGrid1.RowCount := 3; StringGrid1.ColCount := 3; StringGrid1.Rows[1].Text := 'eins'+#13#10+'zwei'+#13#10+'drei'+#13#10+#13#10; //Rows[x].Count jetzt 4 end; procedure TForm1.Button1Click(Sender: TObject); begin StringGrid1.Cells[3,1] := 'test'; StringGrid1.Rows[1].Exchange(1,3); StringGrid1.Rows[1].Exchange(3,2); end; |
Re: gegensatz zu rowcount
Zitat:
|
Re: gegensatz zu rowcount
Guten Abend,
marabu hatte hier diesen Code zum Einfügen von Zeilen in das StringGrid gepostet:
Delphi-Quellcode:
Grüße
procedure TDemoForm.InsertRow(iRow: integer);
var i: integer; begin with StringGrid do begin if iRow < FixedRows then raise Exception.Create('you cannot insert a fixed row'); RowCount := RowCount + 1; for i := RowCount - 1 downto Succ(iRow) do Rows[i].Assign(Rows[i-1]); Rows[iRow].Clear; end; end; Klaus |
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:13 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz