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....



TpcMouseMoveInChartEvent


Unit:SDL_polchart
Class:TPolChart
Declaration:TpcMouseMoveInChartEvent = procedure (Sender: TObject; InChart: boolean; Shift: TShiftState; rad, phi: double) of object;

The type declaration TMouseMoveInChartEvent defines the event which occurs when the mouse moves across the chart window. The parameter InChart is TRUE, if the mouse cursor is on the drawing area. The parameter Shift returns the state of the mouse buttons, and the parameters rad and phi return the mouse position in terms of the chart coordinates.

Note that InChart can be advantageously used to switch the state of the position display (for example gray out the position values, if the cursor is outside the drawing area).

The following example shows how to use the event in order to display the current mouse position. The components NumLab1 and NumLab2 can be switched off by setting the property Empty to TRUE.

 
procedure TForm1.PolChart1MouseMoveInChart(Sender: TObject; InChart: Boolean; Shift: TShiftState; rad, phi: double); 

begin 
NumLab1.Empty := not Inchart; 
NumLab2.Empty := not Inchart; 
NumLab1.Value := rad; 
NumLab2.Value := phi; 
end; 


Last Update: 2012-Oct-20