BBjColorChooser::isPreviewPanelVisible

Description

In BBj 7.0 and higher, this determines if the BBjColorChooser's preview panel is showing.

Syntax

Return Value

Method

boolean

isPreviewPanelVisible()

Parameters

None.

Return Value

Returns a non-zero value if the preview panel is visible; otherwise returns zero.

Remarks

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=10
Y=10
WIDTH=650
HEIGHT=350
TITLE$="BBj Window"

REM Set the current context
mySysGui!.setContext(0)

REM Create a window
myWindow! = mySysGui!.addWindow(X,Y,WIDTH,HEIGHT,TITLE$)
myCEdit! = myWindow!.addCEdit(101, 10, 10, 190, 190, "Text")

REM Add a color chooser on the window
myColorChooser! = myWindow!.addColorChooser(201,200,0,450,350)
IF (myColorChooser!.isPreviewPanelVisible())
    myColorChooser!.setPreviewPanelVisible(0)
ENDIF
myColorChooser!.setControlButtonsAreShown(0)

REM Register the CALLBACK routines
CALLBACK(ON_COLORCHOOSER_CHANGE,CHANGE_COLOR,mySysGui!.getContext(),myColorChooser!.getID())
CALLBACK(ON_CLOSE,DO_CLOSE,mySysGui!.getContext())

REM Process Events
PROCESS_EVENTS

CHANGE_COLOR:
    color! = myAPI!.getLastEvent().getColor()
    myCEdit!.setForeColor(color!)
RETURN

REM Callback routine called when the colorchooser's OK button is pressed
DO_CLOSE:
RELEASE

See Also

BBjAPI

BBjSysGui

BBjWindow

BBjColorChooser

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