<div dir="ltr">Hi!<div><br></div><div>Even using this event, if the combobox selection is changed one time (ItemIndex<>-1), the mouse wheel will change the selection if the mouse cursor is over the combobox.</div><div><br></div><div>I tried to modify the qt widget, but no success. Appears to be an LCL issue, since QT docs says to change the focus police to QtStrongFocus to solve this problem (I don't find the fix for GTK2) </div><div><br></div><div>The best regards,</div><div><br></div><div>Fabio</div></div><br><div class="gmail_quote"><div dir="ltr">Em ter, 18 de set de 2018 às 12:05, Vojtěch Čihák <<a href="mailto:vojtech.cihak@atlas.cz" target="_blank">vojtech.cihak@atlas.cz</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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">you can use event</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">procedure TForm1.ComboBox1MouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint;</p>

<p style="padding:0 0 0 0;margin:0 0 0 0">  var Handled: Boolean);</p>

<p style="padding:0 0 0 0;margin:0 0 0 0">begin</p>

<p style="padding:0 0 0 0;margin:0 0 0 0">  Handled:=True;</p>

<p style="padding:0 0 0 0;margin:0 0 0 0">end; </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">this will not scroll the scrollbox when mouse pointer is over combobox, but ComboBox.ItemIndex will at least not change.</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">V.</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">______________________________________________________________<br>
> Od: "Fabio Luis Girardi via Lazarus" <<a href="mailto:lazarus@lists.lazarus-ide.org" target="_blank">lazarus@lists.lazarus-ide.org</a>><br>
> Komu: "Lazarus mailing list" <<a href="mailto:lazarus@lists.lazarus-ide.org" target="_blank">lazarus@lists.lazarus-ide.org</a>><br>
> Datum: 18.09.2018 16:27<br>
> Předmět: [Lazarus] Mouse wheel problem<br>
></p>

<div dir="ltr">
<div dir="ltr">Hi all!
<div>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. </div>
<div>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.</div>
<div>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.</div>
<div>The same behavior is in GTK2 and QT4. I don't have tried on QT5.</div>
<div>
<div>Someone knows how workaround or fix this?</div>
-- <br>

<div class="m_3448883088380080595m_-6411714715904487616gmail_signature" dir="ltr">The best regards,<br>
<br>
Fabio Luis Girardi<br>
PascalSCADA Project<br>
<a href="http://sourceforge.net/projects/pascalscada" target="_blank">http://sourceforge.net/projects/pascalscada</a><br>
<a href="http://www.pascalscada.com" target="_blank">http://www.pascalscada.com</a></div>
</div>
</div>
</div>
<br>
 <br>
 ----------<br>
 <br>
 -- <br>
 _______________________________________________<br>
 Lazarus mailing list<br>
 <a href="mailto:Lazarus@lists.lazarus-ide.org" target="_blank">Lazarus@lists.lazarus-ide.org</a><br>
 <a href="https://lists.lazarus-ide.org/listinfo/lazarus" target="_blank">https://lists.lazarus-ide.org/listinfo/lazarus</a><br>

</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_3448883088380080595gmail_signature" data-smartmail="gmail_signature">The best regards,<br><br>Fabio Luis Girardi<br>PascalSCADA Project<br><a href="http://sourceforge.net/projects/pascalscada" target="_blank">http://sourceforge.net/projects/pascalscada</a><br><a href="http://www.pascalscada.com" target="_blank">http://www.pascalscada.com</a></div>