On Apr 30, 2009, at 9:53 AM, Tom wrote:
Charles Yeomans wrote:
The behavior as you see it has been so as long as I can remember.
But the documentation for the current version of REALbasic states
"The mouse button was released inside the Canvas region at the
location passed in to x,y"
I suggest that you file a feedback report.
Thanks for the info. I wrote a bug report abut this.
I understand the the MouseUp outside of the canvas is helpful for
drag & drop but for a custom button it makes more work because you
need to check the x/y-position of the MouseUp event.
Perhaps it would be helpful to make the behavior optional...
I look forward to RS response. The bug is "Case 7521".
Such optional behavior almost always proves to be an annoyance for
me. Instead, I suggest that you use this method.
Function IsMouseOver(X as Integer, Y as Integer) as Integer
return (X >= 0) and (X < me.Left) and (Y >= 0) and (Y < me.Height)
End Function
Either add it to your custom button classes, as I do, or add it to all
Canvas objects as an extension method.
Function IsMouseOver(extends c as Canvas, X as Integer, Y as Integer)
as Integer
return (X >= 0) and (X < c.Left) and (Y >= 0) and (Y < c.Height)
End Function
Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|