The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



SuppressPaint


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;

Example: This property is used in the following example programs (see http://www.lohninger.com/examples.html for downloading the code): geodata, multilinreg, replistv, sortarray



Last Update: 2013-May-30