bool wb_set_cursor (int wbobject, mixed source)
Set or change the mouse cursor shape of a window, control, a whole class or application-wide.
The cursor can be set for any window class and for control classes ImageButton, InvisibleArea (deprecated), HyperLink and EditBox.
The source parameter can be a cursor handle from function wb_load_image() or one of the preset system cursors: arrow, cross, finger, forbidden, help, ibeam, null (no cursor), sizeall, sizenesw, sizens, sizenwse, sizewe, uparrow, wait and waitarrow.
Use this function according to the table below.
| wbobject |
source |
What it does |
|---|---|---|
|
|
|
Set the application cursor to the default cursor (arrow). |
|
|
Handle |
Set the application cursor to the specified cursor handle. |
|
|
String |
Set the application cursor to the specified cursor name. |
|
Class name |
|
Set the class cursor to the default cursor (arrow). |
|
Class name |
Handle |
Set the class cursor to the specified cursor handle. |
|
Class name |
String |
Set the class cursor to the specified cursor name. |
|
Handle |
|
Set the window or control cursor to the default class cursor. |
|
Handle |
Handle |
Set the window or control cursor to the specified cursor handle. |
|
Handle |
String |
Set the window or control cursor to the specified cursor name. |
Returns
TRUE on success or FALSE if an error occurs.
// Set the cursor of a single control wb_set_cursor($button, 'finger'); // Set the cursor of a single window wb_set_cursor($button, 'cross'); // Set the cursor for whole classes $cursor = wb_load_image('finger.cur'); // Hide the cursor of the current application wb_set_cursor(NULL, 'none'); |
wb_load_image
window classes
System functions