MouseWheel Scrolling doesn't trigger OnScroll
MouseWheel Scrolling doesn't trigger OnScroll
The subject says it all. The same is probably true if the AxisScroll or AxisArrows tools are used. All three behave differently than manually panning with the right mouse button. After panning around with the right mouse button, UndoZoom restores the chart to it's "original" axis values. Using the MouseWheel to scroll does not. Neither do the AxisScroll or AxisArrow tools in the Demo program.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: MouseWheel Scrolling doesn't trigger OnScroll
Hi skassan,
Yes, I could reproduce this here. I'll add your request to the wish-list to be considered for inclusion in future releases. In the meantime you can reset scroll implementing the OnUndoZoom event like this:
Yes, I could reproduce this here. I'll add your request to the wish-list to be considered for inclusion in future releases. In the meantime you can reset scroll implementing the OnUndoZoom event like this:
Code: Select all
procedure TForm4.Chart1UndoZoom(Sender: TObject);
begin
Chart1.Axes.Left.Automatic:=true;
Chart1.Axes.Bottom.Automatic:=true;
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 4
- Joined: Mon Jan 14, 2019 12:00 am
- Location: Koblenz, Germany
- Contact:
Re: MouseWheel Scrolling doesn't trigger OnScroll
Hi,
I'd like to bump this old request, based on a different use case.
We use the
or vice versa in the
Since one of our recent updates (probably the Bug #2433 fix for horizontal-only mouse wheel scrolling), the charts now react to the mouse wheel - which is good - but they don't sync.
Our somewhat dirty workaround is propagating the actual scrolling by calling the other chart's corresponding protected function from the mouse wheel event handler:
I also tried adding a
Our current build version is 2023.37.230130.
Thanks in advance for checking again,
Stefan
I'd like to bump this old request, based on a different use case.
We use the
OnScroll
event to synchronize the (horizontal, i.e. date) position of our Gantt chart with a corresponding workload chart we display below it. When panning via mouse button this works by simply setting
Code: Select all
dbChartLoad.BottomAxis.SetMinMax(dbChartGantt.TopAxis.Minimum,
dbChartGantt.TopAxis.Maximum);
OnScroll
event handler.Since one of our recent updates (probably the Bug #2433 fix for horizontal-only mouse wheel scrolling), the charts now react to the mouse wheel - which is good - but they don't sync.
Our somewhat dirty workaround is propagating the actual scrolling by calling the other chart's corresponding protected function from the mouse wheel event handler:
Code: Select all
type
TkoDBChartAccessor = class(TDBChart);
var
fSyncMouseWheelTarget : TDBChart;
procedure TSomeFrame.dbChartGanttOrLoadMouseWheel(Sender: TObject;
Shift: TShiftState; WheelDelta: Integer;
MousePos: TPoint; var Handled: Boolean);
begin
if Sender = fSyncMouseWheelTarget then
begin
//end recursion: don't propagate any further, but don't prevent the
//scrolling either
exit;
end;
if Sender = dbChartGantt then
begin
fSyncMouseWheelTarget := dbChartLoad;
end
else //Sender = dbChartLoad
begin
fSyncMouseWheelTarget := dbChartGantt;
end;
try
TkoDBChartAccessor(fSyncMouseWheelTarget).DoMouseWheel(Shift, WheelDelta,
MousePos);
finally
fSyncMouseWheelTarget := nil;
end;
end;
TChartScrollBar
but it did not trigger the OnScroll
event either. Since I ran into some other trouble with it also, we postponed that. In any case, supporting the OnScroll-Event no matter the scrolling method would provide for a straightforward and clean solution.Our current build version is 2023.37.230130.
Thanks in advance for checking again,
Stefan
Re: MouseWheel Scrolling doesn't trigger OnScroll
Hello Stefan,
I'm afraid the request Narcís added was lost when we moved to bugzilla.
I've added it at #2683, and already fixed it.
So the next version should be triggering
I'm afraid the request Narcís added was lost when we moved to bugzilla.
I've added it at #2683, and already fixed it.
So the next version should be triggering
OnScroll
event from the mouse wheel.Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 4
- Joined: Mon Jan 14, 2019 12:00 am
- Location: Koblenz, Germany
- Contact:
Re: MouseWheel Scrolling doesn't trigger OnScroll
Hi,
ok, that. was. fast. Many thanks!
All the best,
Stefan
ok, that. was. fast. Many thanks!
All the best,
Stefan