| To: | REALbasic NUG <realbasic-nug@lists.realsoftware.com> |
|---|---|
| Subject: | Re: Wrong Canvas.MouseUp Event? |
| From: | Jim Dossey <jim.dossey@gmail.com> |
| Date: | Thu, 30 Apr 2009 08:04:42 -0400 |
| Authentication-results: | mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com; dkim=neutral (body hash did not verify) header.i=@gmail.com |
| Delivered-to: | listarchive@realsoftware.com |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=BHMLuvvK7Ex9LIMCVV85Qxzj7FSz8ay5EX7MFYBcplA=; b=Zn7Gzpe2fBNV8TEIm0Aobmdk7PuhgUZFcs1ZOIvZwhw8MOmBjimNfm7LcA/n+GNP+d BF+cMm6cF7eMAC07vmu5UXGdlkGp4wA/H8XsMDHPjChkFUD22oNTe4qa58fhAYoOQCIZ 8n5AEzGJM2fPlQ2mkLcBun+aHdW8SWjl1y+es= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=FcEYNogsTq+dZqLTUqU0+iaZplT4wBGOX3foIrkZ4nhNFSC6gC15WqnLqv385yes7f H75Pck0bja8EuT7F5qDl4NFvgPAhhG+JhtShXrxqmTq5zgChZUlOkqDN/Vy4g7TwGhIq 24W4fnPdXUTu+cY9HYgCYUL3ONpah2YTxGFmc= |
| In-reply-to: | <49F9709D.5080107@helios.de> |
| References: | <49F9709D.5080107@helios.de> |
| Reply-to: | REALbasic NUG <realbasic-nug@lists.realsoftware.com> |
| Sender: | realbasic-nug-bounces@lists.realsoftware.com |
On Thu, Apr 30, 2009 at 5:34 AM, Tom <tom@helios.de> wrote: > Hi List! > > The Language reference states: > >> Canvas.MouseUp Event: >> The mouse button was released inside the Canvas region at the location >> passed in to x,y. >> > > But the event also occurs when the mouse is released _ouside_ of the > canvas! > > To reproduce this: > make a new project and put a canvas and an Editfield on the Window. Make > the EditField multiline. > In the Canvas events add following code > >> Sub Paint(g As Graphics) >> g.ForeColor = &cFFAB60 >> g.FillRect 0,0,me.Width, me.Height >> End Sub >> >> Function MouseDown(X As Integer, Y As Integer) As Boolean >> EditField1.AppendText "MouseDown, x=" + str(x) + ", y=" + str(y)+ >> EndOfLine >> return true >> End Function >> >> Sub MouseUp(X As Integer, Y As Integer) >> EditField1.AppendText "MouseUp, x=" + str(x) + ", y=" + str(y)+ >> EndOfLine End Sub >> > > Now click the canvas and drag the mouse outside of it. Then release the > mouse key. > I think there should be no MouseUp Event because the mouse is not released > _inside_ of the Canvas area. > Tested on Mac and Win XP. > > This looks like a bug for me. Comments please. I don't see this as a bug. For example, a user might click on a control and then realize that was a mistake. So they move the mouse out of the control before releasing the button. By checking the X,Y coordinates you can see what the user did and take the appropriate action. There are probably other much better reasons for having mouseup events outside of the control. _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html> |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Wrong Canvas.MouseUp Event?, Greg O'Lone |
|---|---|
| Next by Date: | Re: Wrong Canvas.MouseUp Event?, Tom |
| Previous by Thread: | Re: Wrong Canvas.MouseUp Event?, Greg O'Lone |
| Next by Thread: | Re: Wrong Canvas.MouseUp Event?, Tom |
| Indexes: | [Date] [Thread] [Top] [All Lists] |