> Merely depressing the mouse button does not usually count as a click. A 
> click is a mouse down and a mouse up. If you're going to handling any 
> kind of dragging, then you also need to pay attention to where the 
> clicks occur; if the mouse up happens far enough away from the mouse 
> down, then it's a drag and drop, not a click.

Right, I'm aware of this as I had to deal with it in another 
situation, but this was just something I put together quickly to try 
to see how to get the event handlers published, etc, so it was an 
oversight, and I'm not very familiar with creating components. 
Eventually I want to create an 'OnButtonClick' event for this, I 
suppose I will trigger it from the MouseUp message (and do checking 
for the distance the mouse has moved since the MouseDown, whether 
it's still within the button's boundaries, etc).

> In these message handlers, you're not calling the inherited methods. 
> You're omiting code that would normally run. That's a problem until you 
> veryify that all the code is stuff you _intend_ to skip.

I think this is the key to it. I added 'inherited' to the message 
handlers and this appears to have stopped the permanent mouse 
capture. I guess it didn't occur to me that I could use 'inherited' 
in the message handlers.
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to