Vcl.Graphics.TCustomCanvas.OnChange

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnChange: TNotifyEvent read FOnChange write FOnChange;

C++

__property System::Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};

Properties

Type Visibility Source Unit Parent
event public
Vcl.Graphics.pas
Vcl.Graphics.hpp
Vcl.Graphics TCustomCanvas

Description

Occurs when the image has just changed.

Write an OnChange event handler to take specific action whenever the image on the canvas changes. When an application calls one of the drawing methods of TCustomCanvas, the following steps occur:

  1. An OnChanging event occurs.
  2. The TCustomCanvas method makes the change to the canvas.
  3. An OnChange event occurs.

OnChange events occur on changes to the image, not changes to the properties of the canvas. For descending canvas implementations that support assigned graphical objects such as Brush, Pen, or Font, applications can respond to changes in those by assigning OnChange event handlers to the corresponding objects. However, most descending canvas implementations derived from TCustomCanvas assign their own OnChange event handlers for the attached objects. Before assigning an OnChange event handler to one of these objects (Pen, Brush, and so on), read the existing event handler. Use that value to call the TCustomCanvas descendant's event handler from the new event handler.

See Also