BBjInputD::getPlusMinus

Description

In BBj 5.0 and higher, this method returns the keys used to scan forward and backward through dates in this BBjInputD control.

Syntax

Return Value

Method

boolean

getPlusMinus()

Parameters

None.

Return Value

None.

Remarks

Returns whether the + and – keys or the up arrow and down arrow keys scan forward and backward through dates (0 = up-arrow/down-arrow, 1=plus/minus).

Example

rem 'Scan through dates with +/- or up-arrow/down-arrow

rem 'Obtain the instance of the BBjAPI object
let myAPI! = BBjAPI()

rem 'Open the SysGui device
SYSGUI = UNT
OPEN (SYSGUI)"X0"

rem 'Obtain the instance of the BBjSysGui object
let mySysGui! = myAPI!.getSysGui()

rem 'Set addWindow param values
X = 10
Y = 10
WIDTH = 200
HEIGHT = 120
TITLE$="BBj Window"

rem 'Set the current context
mySysGui!.setContext(0)

rem 'Create a window
myWindow! = mySysGui!.addWindow(X,Y,WIDTH,HEIGHT,TITLE$,$00010003$)

rem 'Add an InputD control
myInputD! = myWindow!.addInputD(101,50,10,90,30,$080c$,"",$$,0,0)

rem 'Add a text control
myLabel! = myWindow!.addStaticText(102,50,50,140,30,$$,"")

rem 'Use +/- instead of up/down?
PlusMinus! = myWindow!.addCheckBox(103,50,70,150,30,"Scan with +/-?")

gosub ShowPlusMinus

DIM EVENT$:TMPL(SYSGUI),GENERIC$:NOTICETPL(0,0)

rem 'Register the CALLBACK routines
CALLBACK(ON_CHECK_ON,PlusMinusOn,mySysGui!.getContext(),PlusMinus!.getID())
CALLBACK(ON_CHECK_OFF,PlusMinusOff,mySysGui!.getContext(),PlusMinus!.getID())
CALLBACK(ON_CLOSE,APP_CLOSE,mySysGui!.getContext())

rem 'Process Events
process_events

PlusMinusOn:
    myInputD!.setPlusMinus(1)
    gosub ShowPlusMinus
return

PlusMinusOff:
    myInputD!.setPlusMinus(0)
    gosub ShowPlusMinus
return

ShowPlusMinus:
    msg$ = iff(myInputD!.getPlusMinus(),"+/-","up/down")
    myLabel!.setText("Scan with: "+msg$)
return

rem 'Callback routine called when the user closes the application window
APP_CLOSE:
release

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

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