HyperCard: Changing the Cursor While in a Field or Button (8/93)

Here is a short handler that changes the standard "Browse" cursor into
another cursor while the mouse is within a button or field.

on mouseWithin
set cursor to "busy" -- or other cursor
repeat while the mouseLoc is within the rect of the target
if the mouseClick then
[action on mouseClick]
exit mouseWithin
end if
end repeat
end mouseWithin

If this handler is used in a field, make sure the field is locked. If it
isn't, and you click the mouse while over the field, any characters typed
will be stored in a memory buffer, and the typed text will appear in the
field as soon as the cursor is moved away from the field.

Putting this handler at the card level will cause it to change the cursor
when it enters any button or locked field on the card. To make the handler
respond specifically to buttons or fields only, insert the following line
of text between ON MOUSEWITHIN and SET CURSOR TO BUSY:

if "button" is not in the target then exit mouseWithin

Use "field" instead of button if you only want fields responded to with the
different cursor.

This article is adapted from the Claris Tech Info database.
Support Information Services
Published Date: Feb 19, 2012