 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Dave Barcomb Guest
|
Posted: Thu Jun 29, 2006 9:31 pm Post subject: onMouseLeave event Problem ? |
|
|
In my onStartDrag example, number 10235 in borland.public.attachments,
I have an onMouseLeave event.
Note, change BeginDrag to TMaskEdit(Sender).BeginDrag(False, 5);.
I have noticed that when dragging, the onMouseLeave is called before I
actually leave the control. It seems that the onMouseLeave event is
occuring right after the BeginDrag() method call. When I am not
dragging the onMouseLeave event occurs after I leave the control. Set a
breakpoint in MIMouseLeave to test this.
I also notice that the onStartDrag event occurs right after the
BeginDrag(false,5) method call, not after the mouse moves 5 positions
and dragging actually starts.
Am I doing something wrong somewhere?
Thanks
Dave Barcomb
-- |
|
| Back to top |
|
 |
Dave Barcomb Guest
|
Posted: Thu Jun 29, 2006 9:44 pm Post subject: Old posting that talks about similar problems created by Beg |
|
|
I am appending an old posting I found to deal with the onStartDrag
event occuring as soon as the beginDrag method is called. Any other
ideas?
Thanks again
Dave Barcomb
From: Peter Below -
Date: Wed, May 6 1998 12:00 am
Email: Peter Below <100113.1...@compuserve.com>
Groups: borland.public.delphi.objectpascal
| Quote: | I'm having some difficulties with TControl.BeginDrag and the Dragging
property.
I have a TImage that I want the user to be able to click on, and also
drag over another
image. The problem is that I don't want the OnClick event to fire when
the user is about to drag the control..
|
_snip_
Tommy,
change your approach. In the OnMouseDown event, store the mouse position
in a form field, do not call beginDrag yet. In OnMouseMove, if not
already
dragging, check the mouse position an get the distance to the point the
mouse did go down over. If the distance is above the threshhold you
want to
use to distinguish a "true" drag from a spurious wiggle on a click, call
BeginDrag.
Peter Below (TeamB) 100113.1...@compuserve.com)
Reply |
|
| Back to top |
|
 |
JD Guest
|
Posted: Fri Jun 30, 2006 2:06 am Post subject: Re: Old posting that talks about similar problems created by |
|
|
"Dave Barcomb" <vtmogulskier (AT) adelphia (DOT) net> wrote:
FYI : When you change the Subject line, it breaks the thread
when it gets archived.
| Quote: | I am appending an old posting I found to deal with the
onStartDrag event occuring as soon as the beginDrag method
is called. Any other ideas?
|
This thread might be of interest:
http://tinyurl.com/ff2pg
~ JD |
|
| Back to top |
|
 |
JD Guest
|
Posted: Fri Jun 30, 2006 2:21 am Post subject: Re: onMouseLeave event Problem ? |
|
|
"Dave Barcomb" <vtmogulskier (AT) adelphia (DOT) net> wrote:
You know .... I have to ask why you're posting in CPP groups
instead of Delphi groups? Not that it's a problem for me but
you're really limiting your audience - especially when you
post Delphi code instead of C++.
| Quote: | [...] Am I doing something wrong somewhere?
|
I don't care for Delphi much so I dislike digging into the VCL
source code. With that said, my observations are that any call
to BeginDrag causes WM_LBUTTONUP to be sent to the control,
the mouse capture changed (to the form?), and then WM_LBUTTONDOWN
is sent to the control with the capture. All of it transparent
to the user who continues to hold the mouse button down.
If the link in my other post doesn't solve your problem,
perhaps you should explain *what* you're trying to accomplish
instead of *how* you're trying to accomplish it.
~ JD |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|