BBjControl::setCursor

Description

In BBj 10.00 and higher, this method sets the cursor style on the BBjControl.

Syntax

Return Value Method
void setCursor(int cursor)

Parameters

Parameter Description
cursor Specifies the cursor ID, taken from the following list:

Note:

Hover over the rows to preview each cursor style.

Cursor IDStyleWindow Name
32512 or 0ArrowOCR_NORMAL
32513 or 2IbeamOCR_IBEAM
32514 or 3WaitOCR_WAIT
32515 or 1CrosshairOCR_CROSSHAIR
32516Up ArrowOCR_UPARROW
32642Size NWSEOCR_SIZENWSE
32643Size NESWOCR_SIZENESW
32644Size WEOCR_SIZEWE
32645Size NSOCR_SIZENS
32646Size AllOCR_SIZEALL
32648NoOCR_NO
32649HandOCR_HAND
32650App StartingOCR_APPSTARTING
32651What's This?OCR_WHATSTHIS

Return Value

None.

Example

rem ' BBjControl::setCursor

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(50,50,300,150,"setCursor",$00090003$)
window!.setCallback(window!.ON_CLOSE,"eoj")
button! = window!.addButton(1,50,30,200,30,"",$$)
button!.setCallback(button!.ON_BUTTON_PUSH,"cursor")
text! = window!.addStaticText(101,50,75,300,25,"",$$)
gosub cursor
process_events

eoj:
release

restart:
    restore 0

cursor:
    dread cursor,cursor$,err=restart
    button!.setCursor(cursor)
    button!.setText(CURSOR$+" "+STR(CURSOR))
    window!.setCursor(cursor)
    window!.setTitle(CURSOR$+" "+STR(CURSOR))
    text!.setText(CURSOR$+" "+STR(CURSOR))
return

DATA 32512,"OCR_NORMAL"
DATA 32513,"OCR_IBEAM"
DATA 32514,"OCR_WAIT"
DATA 32515,"OCR_CROSS"
DATA 32516,"OCR_UP"
DATA 32642,"OCR_SIZENWSE"
DATA 32643,"OCR_SIZENESW"
DATA 32644,"OCR_SIZEWE"
DATA 32645,"OCR_SIZENS"
DATA 32646,"OCR_SIZEALL"
DATA 32648,"OCR_NO"
DATA 32649,"OCR_HAND"
DATA 32650,"OCR_APPSTARTING"

See Also

BBjAPI

BBjSysGui

BBjWindow

BBjWindow::setCursor

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.