BBjColorChooser::getControlButtonsAreShown

Description

In BBj 7.00 and higher, use this method to determine if the BBjColorChooser's pprove and cancel buttons are visible.

Syntax

Return Value

Method

boolean

getControlButtonsAreShown()

Parameters

None.

Return Value

None.

Example

rem 'Add a color chooser to a window

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 = 0
Y = 0
WIDTH = 550
HEIGHT = 250
TITLE$="BBj Lines"

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

rem 'create the target controls for color selection
myWindow! = mySysGui!.addWindow(X, Y, WIDTH, HEIGHT, TITLE$,$00010083$)

rem 'Add a color chooser on the window
myColorChooser! = myWindow!.addColorChooser(101,200,0,350,250)

rem 'Hide the control buttons
if (myColorChooser!.getControlButtonsAreShown())
    myColorChooser!.setControlButtonsAreShown(0)
endif

rem 'Register the CALLBACK routines
CALLBACK(ON_MOUSE_DOWN,CLICK,myWindow!.getContextID(),myWindow!.getID())
CALLBACK(ON_CLOSE,DO_CLOSE,myWindow!.getContextID())

startX = -1
startY = -1

rem 'Process Events
process_events

rem 'Callback routine called when lines are clicked.
CLICK:
    ev! = myAPI!.getLastEvent()
    xclick = ev!.getX()
    yclick = ev!.getY()
    if (startX = -1)
        startX = xclick
        startY = yclick
        PRINT(SYSGUI)'PUSH'
        PRINT(SYSGUI)'LINE'(xclick, yclick, xclick + 1, yclick + 1)
    else
        PRINT(SYSGUI)'POP'
        color! = myColorChooser!.getColor()
        PRINT(SYSGUI)'PENCOLOR'(color!.getRed(),color!.getGreen(),color!.getBlue())
        PRINT(SYSGUI)'LINE'(startX, startY, xclick, yclick)
        startX = -1
        startY = -1
    endif
return

DO_CLOSE:
release

See Also

BBjAPI

BBjSysGui

BBjWindow

BBjColorChooser

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