ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • Preset cursors
  • Defining a custom cursor for the browser
  • Limitation for List Box and Combo Box controls
  • Limitations
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The MouseCursor property gets and sets the cursor displayed when pointing over a control, window or page.
Reminder: You can define the cursor used in the "UI" tab of the element description window.
Example
// Modify the cursor of the BTN_Validate button
BTN_Validate.MouseCursor = curHelp
WEBDEV - Server codeWEBDEV - Browser code
// Change the cell cursor
CELL_Bckgrd.MouseCursor = "./cursor/earth.ani"
// Change the cursor of the Edit control
EDT_Name.MouseCursor = "http://MyServer/MYPROJECT_WEB/pen_r.cur"
Syntax
WINDEVAndroidJavaUser code (UMC)

Getting the hover cursor used for a window or window control Hide the details

<Cursor name> = <Element used>.MouseCursor
<Cursor name>: Character string or integer constant
Name of the cursor used for the specified control or window. Can correspond to:
  • A specific cursor name (file with a .CUR or .ANI extension):
    • name of the cursor if the file is located in the current directory,
    • name and full path of the cursor if the file is located in a directory other than the current directory.
      Java ".CUR" or ".ANI" custom mouse cursors are not supported in Java.
      Android ".ANI" custom mouse cursors are not supported in Java.
  • A preset cursor identified by one of the following constants:
    curArrowStandard arrow
    curCrossStandard cross
    curForbiddenSign not allowed
    curHandHand
    curHelpHelp on an object
    curIbeamInput cursor
    curSizeCross arrow cursor
    curSizeNESWNorth East/South West arrow
    curSizeNSNorth/South arrow
    curSizeNWSENorth West/South East arrow
    curSizeWEEast/West arrow
    curSystemHandSystem hand
    Java Same cursor as curHand.
    curUpArrowUp arrow
    curWaitHourglass
<Element used>: Control name or window name
Name of the control or window for which the associated cursor is to be found.
WEBDEV - Server codeWEBDEV - Browser code

Getting the hover cursor used for a page or page control Hide the details

<Cursor name> = <Element used>.MouseCursor
<Cursor name>: Character string or integer constant
Name of the cursor used for the specified control or page. The default value is the curAutomatic constant: the cursor is inherited if a parent element has a specific cursor, otherwise the default cursor of the control is used.
Can correspond to:
  • A specific cursor name (cursor file supported by the browser). The associated CSS value corresponds to url(<Cursor URL>).
  • A preset cursor CSS value (see table below)
  • A preset cursor identified by one of the following constants:
    curArrowForbiddenArrow and sign not allowed
    Associated CSS value: no-drop
    curArrowWaitArrow and hourglass
    Associated CSS value: progress
    curAutomaticAutomatic cursor: the cursor is inherited if a parent element has a specific cursor, otherwise the default cursor of the control is used.
    Associated CSS value: auto
    curCrossStandard cross
    Associated CSS value: crosshair
    curDefaultDefault cursor associated with the control
    Associated CSS value: default
    curForbiddenSign not allowed
    Associated CSS value: not-allowed
    curHandHand
    Associated CSS value: pointer
    curHelpHelp on an object
    Associated CSS value: help
    curIbeamInput cursor
    Associated CSS value: text
    curSizeCross arrow cursor
    Associated CSS value: move
    curSizeColumnCursor for resizing columns
    Associated CSS value: col-resize
    curSizeNESWNorth East/South West arrow
    Associated CSS values: NE-resize Arrows, SW-resize Arrows
    curSizeNSNorth/South arrow
    Associated CSS values: S-resize Arrows, N-resize Arrows
    curSizeNWSENorth West/South East arrow
    Associated CSS values: SE-resize Arrows, NW-resize Arrows
    curSizeRowCursor for resizing rows
    Associated CSS value: row-resize
    curSizeWEEast/West arrow
    Associated CSS values: E-resize Arrows, W-resize Arrows
    curSystemHandSystem hand
    This cursor is the same as the one displayed by the curHand constant.
    curWaitHourglass
    Associated CSS value: wait
Remark: The "all-scroll" and "vertical-text" CSS values have no associated WLanguage constants.
WEBDEV - Browser code CSS value associated with the cursor or URL address of a cursor supported by the browser. In this case, the value has the following format: 'url(<Cursor URL>)'.
<Element used>: Name of control or page
Name of the control or page for which the associated cursor is to be found.
WINDEVWindowsAndroidJavaUser code (UMC)

Changing the hover cursor defined for a window control or window Hide the details

<Element used>.MouseCursor = <Cursor name>
<Element used>: Control name or window name
Name of the control or window for which you want to change the cursor
<Cursor name>: Character string or integer constant
Name of the cursor to be used. Can correspond to:
  • A specific cursor name (file with a .CUR or .ANI extension):
    • name of the cursor if the file is located in the current directory,
    • name and full path of the cursor if the file is located in a directory other than the current directory.
      Java ".CUR" or ".ANI" custom mouse cursors are not supported in Java.
      Android ".ANI" custom mouse cursors are not supported in Java.
  • A preset cursor identified by one of the following constants:
    curArrowStandard arrow
    curCrossStandard cross
    curForbiddenSign not allowed
    curHandHand
    curHelpHelp on an object
    curIbeamInput cursor
    curSizeCross arrow cursor
    curSizeNESWNorth East/South West arrow
    curSizeNSNorth/South arrow
    curSizeNWSENorth West/South East arrow
    curSizeWEEast/West arrow
    curSystemHandSystem hand
    Java Same cursor as curHand.
    curUpArrowUp arrow
    curWaitHourglass
WEBDEV - Server codeWEBDEV - Browser code

Changing the hover cursor defined for a page control or page Hide the details

<Element used>.MouseCursor = <Cursor name>
<Element used>: Name of control or page
Name of the control or page for which you want to change the cursor
<Cursor name>: Character string or integer constant
Name of the cursor used for the specified control or window. The default value is the curAutomatic constant: the cursor is inherited if a parent element has a specific cursor, otherwise the default cursor of the control is used.
Can correspond to:
  • The full name of a cursor file (file with a .CUR or .ANI extension). This file must be located in the _WEB directory of the website.
    Remark: Firefox does not support .cur and .ani files.
    WEBDEV - Browser code Custom cursors are not supported.
  • A specific cursor name (cursor file supported by the browser). The associated CSS value corresponds to url(uri).
  • A preset cursor CSS value (see table below)
  • A preset cursor identified by one of the following constants:
    curArrowForbiddenArrow and sign not allowed
    Associated CSS value: no-drop
    curArrowWaitArrow and hourglass
    Associated CSS value: progress
    curAutomaticAutomatic cursor: the cursor is inherited if a parent element has a specific cursor, otherwise the default cursor of the control is used.
    Associated CSS value: auto
    curCrossStandard cross
    Associated CSS value: crosshair
    curDefaultDefault cursor associated with the control
    Associated CSS value: default
    curForbiddenSign not allowed
    Associated CSS value: not-allowed
    curHandHand
    Associated CSS value: pointer
    curHelpHelp on an object
    Associated CSS value: help
    curIbeamInput cursor
    Associated CSS value: text
    curSizeCross arrow cursor
    Associated CSS value: move
    curSizeColumnCursor for resizing columns
    Associated CSS value: col-resize
    curSizeNESWNorth East/South West arrow
    Associated CSS values: NE-resize Arrows, SW-resize Arrows
    curSizeNSNorth/South arrow
    Associated CSS values: S-resize Arrows, N-resize Arrows
    curSizeNWSENorth West/South East arrow
    Associated CSS values: SE-resize Arrows, NW-resize Arrows
    curSizeRowCursor for resizing rows
    Associated CSS value: row-resize
    curSizeWEEast/West arrow
    Associated CSS values: E-resize Arrows, W-resize Arrows
    curSystemHandSystem hand
    This cursor is the same as the one displayed by the curHand constant.
    curWaitHourglass
    Associated CSS value: wait

Remark: The "all-scroll" and "vertical-text" CSS values have no associated WLanguage constants.
WEBDEV - Browser code CSS value associated with the cursor or URL address of a cursor supported by the browser. In this case, the value has the following format: 'url(<Cursor URL>)'.
Remarks
WINDEVWindowsJava

Preset cursors

Preset cursors are Windows cursors that can be changed via the control panel (or desktop themes). The icons have a default value, so they may vary according to the user preferences.
WEBDEV - Server codeWEBDEV - Browser code

Defining a custom cursor for the browser

To define a specific cursor in a page or page control, simply specify a string with the MouseCursor property. WEBDEV automatically performs the following operations when the cursor is displayed on the page:
  • If the string starts with "url(" , the string that follows is considered a direct CSS value, and the value is directly written to the style.
  • If the string starts with "http://" , the address is automatically enclosed in parentheses in the 'url()' CSS value.
  • If the string contains a dot (.) and starts with '/' , the specified URL is considered to be relative to the site. The '\' characters are changed to '/' and the address is enclosed in parentheses in the 'url()' CSS value.
  • If the string contains a dot (.) and does not start with '/' , the specified URL is considered to be relative to the _WEB directory. The '\' characters are changed to '/', fWebDir is added before the URL, and the address is enclosed in parentheses in the 'url()' CSS value.
Remark: To display cursors with an IIS server, the MIME type must be configured for .cur and .ani files. The MIME type to use is "application/octet-stream".
WEBDEV - Server codeWEBDEV - Browser code

Limitation for List Box and Combo Box controls

The MouseCursor property has no effect in the following cases:
  • Use of a List Box or Combo Box control.
  • Use of Internet Explorer (tested on Internet Explorer 7 and earlier versions).
WINDEVWEBDEV - Server codeWEBDEV - Browser codeJava

Limitations

WINDEV The MouseCursor property applies only to:
  • Window controls.
  • Windows.
  • Control templates.
This property cannot be used with:
  • Menus,
  • Rows in a Table or TreeView Table control,
  • Columns in a Table or TreeView Table control.
  • Map controls.
Java The MouseCursor property can only be used with the following elements:
  • Button control.
  • Static control.
  • Edit control.
  • Image control.
  • Check Box control.
  • Radio Button control.
  • List Box control.
  • Combo Box control.
  • TreeView control.
  • Tab control.
  • Table control.
  • Columns of a Table control.
Android The MouseCursor property is available from Android 7.
WEBDEV - Server codeWEBDEV - Browser code The MouseCursor property applies only to:
  • Page controls,
  • Pages.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/29/2024

Send a report | Local help