[lazarus] Speedbutton questions
peter at skel.demon.co.uk
Thu Mar 16 10:48:38 EST 2000
----- Original Message -----
From: Shane Miller <SMiller1 at stvgb.org>
To: <lazarus at miraclec.com>
Sent: Thursday, March 16, 2000 2:22 PM
Subject: RE: [lazarus] Speedbutton questions
> Anyone have an idea on how to fire the CM_MOUSELEAVE message? If you hold
the mouse button down and move the mouse away from the Speedbutton it stays
down when you exit it's area because no CM_MOUSELEAVE fires.
In windows at least this is the 'correct' behaviour as with the mouse down
the windopw has the capture. You will have to generate this msg yourself by
looking for the mouse coords outside your cliprect, and handle the state
flags in the control yourself. You should keep the capture
though as the user may re-enter your control and the button should go back
to the pressed state. In the mouse up you do not fire the click event if you
are outside the cliprect.
This is the way the controls I have written and used work. Once Capture is
set no other message apart from mouseup and mousemove are sent to a control.
More information about the Lazarus