[Lazarus] Mouse wheel problem

Vojtěch Čihák vojtech.cihak at atlas.cz
Tue Sep 18 17:05:02 CEST 2018


Hi,
you can use event
 
procedure TForm1.ComboBox1MouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint;
  var Handled: Boolean);
begin
  Handled:=True;
end; 
 
this will not scroll the scrollbox when mouse pointer is over combobox, but ComboBox.ItemIndex will at least not change.
 
V.
 
______________________________________________________________
> Od: "Fabio Luis Girardi via Lazarus" <lazarus at lists.lazarus-ide.org>
> Komu: "Lazarus mailing list" <lazarus at lists.lazarus-ide.org>
> Datum: 18.09.2018 16:27
> Předmět: [Lazarus] Mouse wheel problem
>
Hi all!I'm experiencing a problem with the mouse wheel and combobox control. I have a big form (4900x1000) on a single monitor. I put this big form on a Scrollbox to make it scrollable. To make the things easy to user/system operator, I decided to move the screen using the mouse wheel. This works fine and makes the navigation on this screen/form easy. The problem appears when the mouse cursor stops (after mouse wheel) over a combobox control. Even the combobox over the mouse cursor doesn't have the focus, the next mouse wheel event doesn't move the screen, but changes the combobox selection.All combobox on my application has Style set to csDropDownList. Another point that I noted, is that mouse wheel change doesn't occur if ItemIndex = -1.The same behavior is in GTK2 and QT4. I don't have tried on QT5.Someone knows how workaround or fix this?-- 
The best regards,

Fabio Luis Girardi
PascalSCADA Project
http://sourceforge.net/projects/pascalscada <http://sourceforge.net/projects/pascalscada>
http://www.pascalscada.com <http://www.pascalscada.com>
 
 ----------
 
 -- 
 _______________________________________________
 Lazarus mailing list
 Lazarus at lists.lazarus-ide.org
 https://lists.lazarus-ide.org/listinfo/lazarus <https://lists.lazarus-ide.org/listinfo/lazarus>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180918/c9a8dd4b/attachment.html>


More information about the Lazarus mailing list