In VCL's, there are events that detect when mouse wheel button is up or down. Is there any way to detect this events in FireMonkey
(for Windows
& IOS
apps)? I couldn't find any help at Delphi's Help
, neither searching on the web. I did a search at stackoverflow
and I didn't find any reference to this subject. Thanks.
The scroll wheel on a modern mouse has taken the place of the middle button. FireMonkey events are exactly the same as VCL events in this respect. Just test for the middle button being involved. For example:
procedure TMyForm.FormMouseDown(Sender: TObject;
Button: TMouseButton;
Shift: TShiftState;
X, Y: Single);
begin
if Button = TMouseButton.mbMiddle then
begin
// The middle button (scroll wheel) was pressed down
end;
end;
The code above assumes that you are coding using enum type name prefixes. If not then obviously you don't need to qualify mbMiddle
.
This should work for Windows and OS X/mac OS applications. How or whether this applies at all on iOS (which you mention) or Android I could not say but I doubt it.