I use teechart v8.07 and want to implement a zoom while mousewheel.
This example don't work as I expected:
Code: Select all
procedure TChroDataResultFrame.ChroDataChartMouseWheel(Sender: TObject;
Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint;
var Handled: Boolean);
with ChroDataChart do begin
if (WheelDelta > 0) then ChroDataChart.ZoomRect(110)
else ChroDataChart.ZoomPercent(90);
Handled:=True;
end;
Point on the chart with the mouse
with the wheel button the series are zoomend in or out, while the center is now at the mouseposition.
This scould be similar as the normal zoomrect with left mousebutton
Zoom in and out must result in the same zoom factor. That means if I zoom in and out the same window should be displayed
How can I do that ?
with best regards
Werner