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_ntabed
Class:TNTabEd
Declaration:property SuppressPaint: boolean;

Changing any element of the data table will trigger a repaint process. This may considerably slow down the (write) access to the table. 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 data table is filled by random values after switching off the repaint mechanism. When finished the repainting is enabled again (enabling the repainting automatically refreshes the table display).

Example: How to temporarily switch off the repaint mechanism.
var
  i, j : longint;

begin
NTabEd1.SuppressPaint := true;
for i:=1 to NTabEd1.NrOfColumns do
  for j:=1 to NTabEd1.NrOfRows do
    NTabEd1.Elem[i,j] := random;
NTabEd1.SuppressPaint := false;
end;

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



Last Update: 2023-Dec-13