[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'ExtCtrls' (#lcl)

TCustomImage.Invalidate

Causes the control to be repainted.

Declaration

Source position: extctrls.pp line 543

public procedure TCustomImage.Invalidate; override;

Description

Invalidate is an overridden procedure which causes the control to be repainted. Invalidate is called when the content or dimensions for the image have been changed.

Invalidate extends the ancestor method to include logic that reduces the number of calls to the Paint method, and avoids flicker caused by the redundant calls. It uses an internal flag in the class to determine if the Paint method has already been called, but has not yet been completed. If the flag has not been set, the inherited Invalidate method is called to refresh the control using its visibility and control style settings.

Remark: No actions are performed in the method when Paint is already active.

See also

TCustomImage.Paint

  

Draws the image to the control canvas.

TControl.IsVisible

  

Returns True if the control is visible, including all of its Parents.

TControl.ControlStyle

  

Style flags, specifying whether the control responds to mouse clicks, can be re-sized, has particular actions, etc.

TControl.Invalidate

  

Force a delayed Repaint of the control, by marking its visible area of the control as invalid.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.