TiComponent.EndUpdate

TiComponent See Also

Re-enables painting of the control that was turned off with the BeginUpdate method.

procedure
EndUpdate;

Description

Use the EndUpdate method to re-enable painting of the control after BeginUpdate has been called. Any property changes or method calls that require the control to be repainted after BeginUpdate is called are cached. Any user interaction with the control using the mouse or keyboard that requires the control to repainted will also be blocked. After EndUpdate is called, normal painting of the control will resume. Only one repaint request will be sent to the Windows API for the control when EndUpdate is called if multiple repaints were request while the control was in the update mode.

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

C++ Builder

iComponent->EndUpdate();

Contents | Index | Previous | Next