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.... |
Home ChartPack RChart Class TSmithChart Events OnZoomPan | |||||||
See also: Events (SmithChart), MouseAction | |||||||
OnZoomPan |
|||||||
The event OnZoomPan occurs after the viewport of TSmithChart has been zoomed or panned. See TZoomPanEvent for a detailed description of the event.
This event may be used to synchronize the viewports of several charts. Suppose you want to make sure that some chart "SmithChart2" always follows the range of the displayed area of another chart "SmithChart1". This can be easily achieved by setting the range of chart 2 when the OnZoomPan event is triggered:
procedure TForm1.SmithChart1ZoomPan(Sender: TObject); begin SmithChart2.SetRange (SmithChart1.RangeXLow, SmithChart1.RangeYLow, SmithChart1.RangeXHigh, SmithChart1.RangeYHigh); end; Note: You should always use the method SetRange (instead of the properties RangeXLow, RangeYLow, and RangeXHigh) for setting the displayed range of the chart, since setting the boundaries one after another would trigger automatic redraws and thus would slow down the display.
|