Within a border?

Jim Hurley jhurley at infostations.com
Thu Mar 25 09:35:37 EST 2004


>
>------------------------------
>
>Message: 2
>Date: Thu, 25 Mar 2004 08:40:57 +0900
>From: Doug Lerner <doug at webcrossing.com>
>Subject: Within a border?
>To: How to use Revolution <use-revolution at lists.runrev.com>
>Message-ID: <BC884B99.2DF03%doug at webcrossing.com>
>Content-Type: text/plain; charset="US-ASCII"
>
>I need to detect whether the cursor is within the border area of a control
>(in this case, a field).
>
>I believe I can do this by using "is within", then defining two rectangles -
>one for the object (containing the border) and one for the object (inside
>the border) and doing an appropriate test with both rectangles.
>
>Unless Revolution has some more convenient syntax for testing for being
>within a control's border. Does it, by any chance?
>
>Any caveats worth mentioning?
>
>Thanks,
>
>doug
>


Doug,

If you are concerned with cursor then you might try:

if the mouseLoc is within the rect of field "myField" then........

If these are two controls, fields perhaps, you might put this in the 
field script:

if intersect( me, field "myField") then....

Jim


More information about the use-livecode mailing list