BBjControl::setCursor

Description

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

Syntax

ReturnValue

Method

int

setCursor(int cursorid)

Parameters

Variable

Description

cursorid

Specifies the cursor id, taken from the following list:

 

Cursor ID

Style

Window Name

 

32512 or 0

Arrow

OCR_NORMAL

 

32513 or 2

Ibeam

OCR_IBEAM

 

32514 or 3

Wait

OCR_WAIT

 

32515 or 1

Crosshair

OCR_CROSSHAIR

 

32516

Uparrow

OCR_UPARROW

 

32642

SizeNWSE

OCR_SIZENWSE

 

32643

SizeNESW

OCR_SIZENESW

 

32644

SizeWE

OCR_SIZEWE

 

32645

SizeNS

OCR_SIZENS

 

32646

SizeAll

OCR_SIZZZEALL

 

32648

No

OCR_NO

 

32649

Hand

OCR_HAND

 

32650

AppStarting

OCR_APPSTARTING

 

32651

What's This?

OCR_WHATSTHIS

Return Value

None.

Remarks

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

BBjControl

BBjWindow

BBjWindow::setCursor

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