| Unit: | SDL_replist | | Class: | TReportListView | | Declaration: | property SuppressPaint:
boolean; |
Changing any element of the report list will trigger the repaint process. This considerably slows down the (write) access to the list. It is therefore recommended to temporarily switch off repainting when a lot of cells are changed programmatically.
The example below shows how to deal with such situations. The whole report list is filled by a constant string ('TEST') after switching off the repaint mechanism. When completed the repainting is enabled again (enabling the repainting automatically refreshes the report list display).
| Example: |
How to temporarily switch off the repaint mechanism. |
|
var
i, j : longint;
begin
RepLst1.SuppressPaint := true;
for i:=1 to RepLst1.NrOfColumns do
for j:=1 to RepLst1.NrOfRows do
RepLst1.Elem[i,j] := 'TEST';
RepLst1.SuppressPaint := false;
end;
|
|