BBjColorChooser::isPreviewPanelVisible

Description

In BBj 7.00 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.

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.