Hi,
 
IMO it is correct. OnMouseWheelxxx are events for rolling the mouse wheel, 
therefore the ssMiddle cannot be in Shift.
If you need to detect if Middle button is pressed, use OnMouseDown/OnMouseUp and test 
"if Mouse=mbMiddle then ..."
Also, ssMiddle appears in Shift in OnMouseDown/OnMouseUp.
 
V.
______________________________________________________________
Od: Wolf <[email protected]>
Komu: [email protected]
Datum: 27.07.2016 11:39
Předmět: [Lazarus] Shift returns empty set in MouseWheel events

For any of these MouseWheel handlers

procedure TForm1.FormMouseWheelDown(Sender: TObject; Shift: TShiftState;
  MousePos: TPoint; var Handled: Boolean);

procedure TForm1.FormMouseWheel(Sender: TObject; Shift: TShiftState;
  WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);

procedure TForm1.FormMouseWheelUp(Sender: TObject; Shift: TShiftState;
  MousePos: TPoint; var Handled: Boolean);

the variable Shift: TShiftState returns an empty set.

Is that intentional, or is that a bug? If intentional, how can I restrict the MouseWheel event to
<WheelPressed>? Other mouse events, such as

procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);

return ssMiddle as a member of the TShiftState set when the MouseWheel is pressed  and
can be tested for using

if ssMiddle in Shift then . . .

How can I determine whether the MouseWheel was pressed or not?

My operating system: Kubuntu 16.04
Lazarus version: 1.6+dfsg-1 dated 2016-03-01
FPC Version: 3.0.0
SVN revision: Debian Package 1.6+dfsg-1
x86_64-linux-qt

Thank you

Wolf
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus-ide.org/listinfo/lazarus 
<http://lists.lazarus-ide.org/listinfo/lazarus>

-- 
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to