WheelEvent queue in the OnZoom handler

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
dmo9999
Newbie
Newbie
Posts: 2
Joined: Mon Nov 30, 2020 12:00 am

WheelEvent queue in the OnZoom handler

Post by dmo9999 » Tue Apr 05, 2022 2:58 pm

Our test team performs negative testing.
The testers have discovered a performance issue using the MouseWheel zoom.
They roll the wheel is both directions rapidly and multiple times.
This causes the WheelEvent queue to load up.
The user stops the wheel movement, but the Zoom in/out actions continue on the screen for some time as the queue is emptied.

Is there a way to clear the WheelEvent queue in the OnZoom handler?

Marc
Site Admin
Site Admin
Posts: 1209
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: WheelEvent queue in the OnZoom handler

Post by Marc » Thu Apr 07, 2022 9:50 pm

Hello,

Is the test being run on an older PC? We can't reproduce the issue on straightforward tests.

You can likely use the following two events and run a counter in there:

Code: Select all

procedure TForm1.Chart1MouseWheel(Sender: TObject; Shift: TShiftState;
  WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
begin
 //check counter...
end;

procedure TForm1.Chart1Zoom(Sender: TObject);
begin
  //check counter... set following until counters coincide
  Chart1.AllowZoom :=False;
end;
Regards,
Marc Meumann
Steema Support

Post Reply