BBjColor

Creation Path


BBjAPI

|

+--BBjSysGui

|

+--BBjColor

 

Description

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

Creation

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

BLACK

0

BBjColor[r=0,g=0,b=0]

BLUE

1

BBjColor[r=0,g=0,b=255]

RED

2

BBjColor[r=255,g=0,b=0]

MAGENTA

3

BBjColor[r=255,g=0,b=255]

GREEN

4

BBjColor[r=0,g=255,b=0]

CYAN

5

BBjColor[r=0,g=255,b=255]

YELLOW

6

BBjColor[r=255,g=255,b=0]

WHITE

7

BBjColor[r=255,g=255,b=255]

DKGRAY

8

BBjColor[r=64,g=64,b=64]

GRAY

9

BBjColor[r=128,g=128,b=128]

LTGRAY

10

BjColor[r=192,g=192,b=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.



______________________________________________________________________________________

Copyright BASIS International Ltd. BBj®, Visual PRO/5®, PRO/5®, and BBx® are registered trademarks.