Although there is one scenario where one has to use Mike's looping
"within"-approach (adjusted to collecting, not exiting the repeat):

If the controls in question (may be all) have some overlapping areas:
controlAtLoc((x,y)) reports only the control at (x,y) with the
highest layer.

> JLG wrote:
> You could also try controlAtLoc() which would avoid the loop.

> MB wrote:
> on mousemove
>    -- just using control number for the quick example
>    put 1 & cr & 2 into objectList 
>    if the mouse is down then
>       repeat for each line tLine  in objectList
>          if within(control tLine,the mouseloc) then
>             put tLine into tResult
>             exit repeat
>          end if
>       end repeat
>    end if
>    if tResult is not empty then
>       put tResult
>    else
>       put "no result"
>    end if
> end mousemove


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to