The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



OnBeforeDrawNeedle


Unit:SDL_meter
Class: TMeter
Declaration: property OnBeforeDrawNeedle: TBeforeDrawNeedleEvent;
{ TBeforeDrawNeedleEvent = procedure (Sender: TObject; Canvas: TCanvas; var NeedleDrawn: boolean) of object; }

The event OnBeforeDrawNeedle provides a hook for adding user defined graphics to the meter. The event is triggered before the needles are going to be drawn. Thus you can draw any graphics below the needle(s).

The parameter Canvas provides access to the canvas of the data area. Please note that the state of the canvas (e.g. the color of its pen, or the fill mode of the brush) depends on the graphics elements drawn before. The variable parameter NeedleDrawn controls whether or not the needle is drawn by the component. Set NeedleDrawn to TRUE if you draw the needle yourself.

Hint: Any graphics drawn on the canvas during the OnBeforeDrawNeedle event will be hidden by the cover of the meter.


Last Update: 2007-Mai-19