| 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;
|
|