unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, StdCtrls;
type
TForm1 =
class(TForm)
Button1: TButton;
StringGrid1: TStringGrid;
StringGrid2: TStringGrid;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
i, x2: integer;
begin
for i := 1
to StringGrid1.RowCount -1
do
for x2 := 1
to StringGrid1.ColCount-1
do
begin
//if stringgrid1.GetCheckBoxState(0,i,state) then
begin
//if state = true then
StringGrid2.Cells[i, x2]:=StringGrid1.Cells[i, x2];
end;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
StringGrid1.rows[0].CommaText := '
Spalte1, Spalte2, Spalte3';
StringGrid1.rows[1].CommaText := '
blabla, a , b, c';
StringGrid1.rows[2].CommaText := '
ablabl, 1 , 2, 3';
end;
end.