TiComponent.BeginUpdate
TiComponent See Also
Prevents repainting of the control until the EndUpdate method is called.
procedure BeginUpdate;
Description
BeginUpdate prevents the control from being repainted when any property is
changed or method is called that will affect the appearance of the control. Any
user interaction with the control using the mouse or keyboard that requires the
control to repainted will also be blocked. Call the EndUpdate method to resume normal painting of the control. When any property is changed
or method is called that requires the control to be repainted while the update
mode is active, the request are cached and a single repaint request will be
made to the Windows API once the EndUpdate method is called.
Use UpdateFrameRate to have the control automatically manage the FrameRate for you.
Typical Uses for BeginUpdate & EndUpdate
Improve performance when changing a large number of properties and or calling
methods that result in repaints of the control (Results in the control only
being repainted once).
Control the frame rate at which a control is repainted (i.e. TiStripChart, TiObjectCanvas)
Temporarily changing the colors of the control for printing (i.e. TiStripChart)
Example
Delphi
iComponent.BeginUpdate;
C++ Builder
iComponent->BeginUpdate();
Note: Calls to BeginUpdate are not cumulative.
Contents | Index | Previous | Next