<p style="padding:0 0 0 0; margin:0 0 0 0;">Hi,</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">IMO it is correct. OnMouseWheelxxx are events for rolling the mouse wheel, therefore the ssMiddle cannot be in Shift.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">If you need to detect if Middle button is pressed, use OnMouseDown/OnMouseUp and test "if Mouse=mbMiddle then ..."</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">Also, ssMiddle appears in Shift in <span style="font-size: 10pt;">OnMouseDown/OnMouseUp.</span></p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"><span style="font-size: 10pt;">V.</span></p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">______________________________________________________________<br />
> Od: Wolf <wv99999@gmail.com><br />
> Komu: lazarus@lists.lazarus-ide.org<br />
> Datum: 27.07.2016 11:39<br />
> Předmět: [Lazarus] Shift returns empty set in MouseWheel events<br />
></p>
For any of these MouseWheel handlers<br />
<br />
procedure TForm1.FormMouseWheelDown(Sender: TObject; Shift: TShiftState;<br />
MousePos: TPoint; var Handled: Boolean);<br />
<br />
procedure TForm1.FormMouseWheel(Sender: TObject; Shift: TShiftState;<br />
WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);<br />
<br />
procedure TForm1.FormMouseWheelUp(Sender: TObject; Shift: TShiftState;<br />
MousePos: TPoint; var Handled: Boolean);<br />
<br />
the variable Shift: TShiftState returns an empty set.<br />
<br />
Is that intentional, or is that a bug? If intentional, how can I <br />
restrict the MouseWheel event to<br />
<WheelPressed>? Other mouse events, such as<br />
<br />
procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, <br />
Y: Integer);<br />
<br />
return ssMiddle as a member of the TShiftState set when the MouseWheel <br />
is pressed and<br />
can be tested for using<br />
<br />
if ssMiddle in Shift then . . .<br />
<br />
How can I determine whether the MouseWheel was pressed or not?<br />
<br />
My operating system: Kubuntu 16.04<br />
Lazarus version: 1.6+dfsg-1 dated 2016-03-01<br />
FPC Version: 3.0.0<br />
SVN revision: Debian Package 1.6+dfsg-1<br />
x86_64-linux-qt<br />
<br />
Thank you<br />
<br />
Wolf<br />
-- <br />
_______________________________________________<br />
Lazarus mailing list<br />
Lazarus@lists.lazarus-ide.org<br />
<a href="http://lists.lazarus-ide.org/listinfo/lazarus">http://lists.lazarus-ide.org/listinfo/lazarus</a><br />