DesktopApplication.MouseCursor

From Xojo Documentation

Revision as of 18:11, 23 July 2021 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As MouseCursor )
aDesktopApplication.MouseCursor = newMouseCursorValue
or
MouseCursorValue = aDesktopApplication.MouseCursor

New in 2021r3

Supported for all project types and targets.

The cursor that is displayed while the application is running and the pointer is within one of the application’s windows.

Notes

On Mac, it is also the cursor that is displayed when the app is frontmost and the pointer moves outside of any of the app's windows. On Windows and Linux, the pointer changes back to the default pointer when it exits an application window. If the Application class MouseCursor is not Nil, the non-Nil MouseCursor properties belonging to any Window or Control are ignored.

You can use the cursors in the Cursors module to set the mouse cursor.

Sample Code

This line in the Opening event of the App class sets the default cursor to the finger pointer.

App.MouseCursor = System.Cursors.FingerPointer