target(), mouseControl(), etc. when mouse button is down

Monte Goulding monte at sweattechnologies.com
Thu Oct 16 20:37:08 EDT 2003


> On Thursday, October 16, 2003, at 05:38  PM, Monte Goulding wrote:
> >> What is the best way to find out which control the mouse is over when
> >> the mouse button is depressed?  Functions such as target() within a
> >> mouseMove handler and mouseControl() placed in the group script always
> >> return the control the user clicked on rather than the control the
> >> mouse is currently over.
> >>
> >> I have a scenario where I have a series of buttons grouped together.
> >> If a user clicks on one of the buttons and moves over another button
> >> with the mouse button still depressed then I want to shift focus to
> >> that button.  I haven't fond an efficient way of shifting focus since
> >> it is difficult to find out when the user moves over different 
> >> controls
> >> with the mouse button down.
> >>
> >
> > Use a mouseMove handler on the card and the target
> 
> In my tests the mouseMove handler will always return the target() or 
> mouseControl() of the control the user clicked on rather than the 
> control the mouse is currently over.  Is there something I am missing 
> that will allow me to get the id of the control the mouse is over while 
> the mouse button is being held down?

Oops sorry, mouseMove and the within function... 

Cheers

Monte


More information about the use-livecode mailing list