![]() |
Re: Ausgewählte Zeilen e. Stringgrid's i.e. anderes Stringg
Liste der Anhänge anzeigen (Anzahl: 1)
Klar. :)
|
Re: Ausgewählte Zeilen e. Stringgrid's i.e. anderes Stringg
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var i, x2, j: integer; begin j := 0; for i := 1 to StringGrid1.RowCount - 1 do begin if stringgrid1.GetCheckBoxState(0, i, state) then begin if state = true then begin Inc(j); for x2 := 1 to StringGrid1.ColCount - 1 do begin StringGrid2.Cells[x2, j] := StringGrid1.Cells[x2, i]; end; end; end; end; end; |
Re: Ausgewählte Zeilen e. Stringgrid's i.e. anderes Stringg
Jepp, das funktioniert.
Ich hatte zwar auch in der Richtung probiert aber letztenendes das Inc(j); und StringGrid2.Cells[x2-1, j-1] nicht gewußt. :-) Danke Aaron |
Re: Ausgewählte Zeilen e. Stringgrid's i.e. anderes Stringg
Die weitere Variable j hab ich eingeführt, um keine Leerzeilen im Grid zu erhalten.
Bei .Cells hast du einfach übersehen, dass hier Zeilen und Spalten vertauscht ist. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:57 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz