RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCanvas.OnChange Event

Occurs when the image has just changed.

Pascal
property OnChange: TNotifyEvent;
C++
__property TNotifyEvent OnChange;

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 TCanvas, the following steps occur. 

1An OnChanging event occurs. 

2The TCanvas method makes a change to the image. 

3An OnChange event occurs. 

OnChange events occur on changes to the image, not changes to the properties of the canvas. Applications can respond to changes in the Font, Brush, and Pen properties by assigning OnChange event handlers to the corresponding TFont, TBrush, and TPen objects. However, TCanvas assigns its own OnChange event handlers for those objects. Before assigning an OnChange event handler to one of these objects, read the existing event handler. Use that value to call the TCanvas event handler from the new event handler. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!