BBjColor

Description

BBjColor is an object that represents a color, which can be used to set or retrieve the color of a BBjControl.

Creation

BBjAPI > BBjSysGui > BBjColor

A BBjColor object is created through the following BBjSysGui methods:

Return Value

Method

BBjColor

makeColor(int colorNum)

BBjColor

makeColor(string colorName)

BBjColor

makeColor(int red, int green, int blue)

BBjColor

makeColor(int red, int green, int blue, int alpha)

A BBjColor object is created through the following BBjAPI methods:

Return Value

Method

BBjColor

makeColor(int colorNum)

BBjColor

makeColor(string colorName)

BBjColor

makeColor(int red, int green, int blue)

BBjColor

makeColor(int red, int green, int blue, int alpha)

Methods of BBjColor

Return Value

Method

int

getBlue()

int

getGreen()

int

getRed()

int

getAlpha()

Remarks

None.

Constants

Constant BBjAPI, BBjSysGui BBjColor
r g b
BLACK 0 0 0 0
BLUE 1 0 0 255
RED 2 255 0 0
MAGENTA 3 255 0 255
GREEN 4 0 255 0
CYAN 5 0 255 255
YELLOW 6 255 255 0
WHITE 7 255 255 255
DKGRAY 8 64 64 64
GRAY 9 128 128 128
LGRAY 10 192 192 192

Example

rem 'Create an instance of a BBjColor object

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 'Create the BBjColor Object using colorNum constant
myColorBlue! = mySysGui!.makeColor(mySysGui!.BLUE)

rem 'Create the BBjColor Object using RGB values
myColorRGB! = mySysGui!.makeColor(215,255,100)

See Also

BBjAPI

BBjSysGui

BBj Object Variables

BBj Object Assignment

BBj Object Error Handling

BBj Object Operators

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