I am afraid that this might be the question of a βlong question,β but wondered if anyone had solid numbers or advice.
I have a TStringGrid that can have 3600 rows, and maybe more, we are not sure yet. Since the monitor obviously has no place for this, only 20 or 30 lines are displayed on the screen. Unfortunately, these are the first entries, and the user has to scroll down to see the lines as they are added.
It may be more convenient to reorder the lines, m with the newest and oldest last. For this, I will need to do something like this (the code may not be accurate)
// slightly quicker if there are many rows & no flicker myStringGrid.Visible := False; rowCount := myStringGrid.RowCount; for row := 1 to Pred(rowCount) do myStringGrid.Rows[row + 1] := myStringGrid.Rows[row]; myStringGrid.RowCount := myStringGrid.RowCount + 1; // now add new row... myStringGrid.Cells[1, 0] := <somthing>; myStringGrid.Cells[1, 1] := <somthing else>; myStringGrid.Cells[1, 2] := <etc>; TestRunDataStringGrid.Visible := True;
I'm concerned about performance. If no one has experience, I will encode the test and report back.
Just wondering if anyone has any experience or opinion on this ...
source share