[Lazarus] OnMouseWheel event issue
And3mD
and3md at gmail.com
Fri Nov 19 20:49:06 CET 2010
Hello!
Some time ago I have the same problem.
Unfortunately this is windows design.
When you scroll then:
If focused control supports scrolling its get WM_MOUSEWHELL message, if it
not support scrolling message is send to focused control parent.
To handle this message in Lazarus you must use SetWindowLong or
SetWindowLongPtr something like this:
http://wiki.freepascal.org/Win32/64_Interface#Processing_non-user_messages_in_your_window
Greetings
Andrzej Kilijanski
Dnia 19-11-2010 o 10:03:58 Birger Jansen <birger at cnoc.nl> napisaĆ(a):
> Hi all,
>
> I have a TPanel on a TForm and an event on the TForm.OnMouseWheel. This
> works when I use the mousewheel on the form. But as soon as the cursor
> is over the TPanel, the OnMouseWheel event on the parent form is not
> triggered. Since the TPanel has no OnMouseWheel there is no way to use a
> mousewheel on a panel.
>
> In Delphi, the TPanel passes the event to the parent control (TForm).
>
> Shall I report a bug or is this designed behaviour?
> I think it relates to this: http://bugs.freepascal.org/view.php?id=12361
>
> Kind regards,
> Birger Jansen
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
More information about the Lazarus
mailing list