KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: How to Change the Mouse Cursor from an Arrow to a Hand
PRODUCT: 4th Dimension | VERSION: 2003.3 | PLATFORM: Mac OS X
Published On: August 19, 2004

Here is how to change the mouse cursor from an arrow to a hand when the cursor moves over an object.

To change the cursor symbol from an arrow to another symbol, you would use the 4D command SET CURSOR. This command changes the mouse cursor stored in the MacOS-based resources. To get the mouse resource, use the 4D command RESOURCE LIST and pass in three required parameters: a four letter resource ID number "CURS", an integer array, and a string array. Below is a sample of the code to change the cursor from an arrow to a hand when the cursor moves over an object.

Case of
    :(Form event=On Mouse Move)
      RESOURCE LIST("CURS";$idArray;$nameString)
      SET CURSOR($idArray{54}) `54 is the location of the hand id
End case