[Lazarus] OnMouseWheel[Down/Up] support in TControl (patch included)
Mattias Gaertner
nc-gaertnma at netcologne.de
Sat Jun 7 01:52:58 CEST 2008
On Sat, 7 Jun 2008 01:41:42 +0300
"Kostas Michalopoulos" <badsector at slashstone.com> wrote:
> > Thanks. Applied.
> >
> > Mattias
>
> No, not really. The part of the code that does the trick of sending
> the message to the correct control is this (in procedure
> TControl.WMMouseWheel, in file control.inc):
For all mouse messages the delegation to the controls is done in
TWinControl.IsControlMouseMsg.
Do you receive OnMouseDown events for the TPaintBox?
> ---
>
> RealControl:=FindLCLControl(MousePos);
> if not Assigned(RealControl) then RealControl:=Self;
>
> if RealControl.DoMouseWheel(Message.State, Message.WheelDelta,
> MousePos) then
>
> ---
> which was not applied (although the rest seems to be moved). Without
> this, TPaintBox and other non TWinControls do not receive the wheel
> messages.
>
> I'm attaching a new patch against revision 15345 which adds these
> lines. I have tested it and it works as supposed.
It already works here. Can you provide an example,
where it does not work?
Mattias
More information about the Lazarus
mailing list