Vcl.Graphics.TCustomCanvas.OnChange
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:
- An OnChanging event occurs.
- The TCustomCanvas method makes the change to the canvas.
- 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.