Hi Guys,
as an old grumpy guy being slow and not at home with logic,
the discussion is quite impressive. Thanks for venting my case.
I agree rowcount maybe a solution.
As said, with the object inspector I assigned 100 rows to start
with. Actually I should redesign the StringGrid by code after
deleting rows - would take me a week or so....
So I only assigned 2 rows, 1 for the titles and 1 for the first row to write onto (and add a row for the next writing).
So far so good, deletion works as it should and it also writes
again - but! only after the deleted rows. I.e. The rows written
before are staying empty.
If I do not assign new rows (+1) error comes with:
Index Out of range Cell[Col=1 Row=4].
Here my code so far:
StringGrid1.RowCount := StringGrid1.RowCount+1;
StringGrid1.Cells[1, spins] := Edit1.text;
StringGrid1.Cells[2, spins] := inttostr(spins);
StringGrid1.Cells[3, spins] := IntToStr(beton);
StringGrid1.Cells[4, spins] := IntToStr(wager);
StringGrid1.Cells[5, spins] := IntToStr(loss);
StringGrid1.Cells[6, spins] := IntToStr(win);
StringGrid1.Cells[7, spins] := IntToStr(budget);
StringGrid1.Cells[8, spins] := mode;
StringGrid1.Cells[9, spins] := Label1.Caption;
And the deletion part:
For C := StringGrid1.RowCount-1 downto 1 Do
StringGrid1.DeleteRow(C);
//StringGrid1.RowCount := StringGRid1.FixedRows;
StringGrid1.RowCount := StringGrid1.ColCount+1;
So, before you start yawning, consider to explain the issues
to a 4 year old brat.
What am I missing?
Klaus