So komme ich nun auch ans Ziel, obwohl ich ja gerne gewußt hätte was ich falsch mache:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
i: Integer;
state: boolean;
begin
Listbox1.Items.Clear;
for i := 1 to StringGrid1.RowCount - 1 do
begin
if stringgrid1.GetCheckBoxState(0,i,state) then
begin
if state then
begin
StringGrid1.SetCheckBoxState(0,i,false);
ListBox1.Items.Add(Stringgrid1.Cells[1,i]+';'+Stringgrid1.Cells[2,i]);
ListBox1.Items.SaveToFile(extractfilepath(application.exename)+'data\tmp.txt');
end;
end;
end;
if listbox1.Items.Count = 0 then
ShowMessage('No items selected');
StringGrid1.Invalidate;
StringGrid2.Clear;
Form1.StringGrid2.Delimiter := ';';
StringGrid2.loadfromCSV(extractfilepath(application.exename)+'data\tmp.txt');
end;
Freundliche Grüße
Aaron