Progress
Language Reference


COLOR-TABLE System Handle

Interfaces
OS
SpeedScript
Graphical only
Windows only
No

A handle to the current color table.

SYNTAX

COLOR-TABLE [ :attribute | :method ] 

attribute

An attribute of the COLOR-TABLE handle.

Attribute
Type
Readable
Setable
INTEGER
CHARACTER

method

A method of the COLOR-TABLE handle.

Method
Return Type
Description
INTEGER
Returns the blue value of the nth entry.
LOGICAL
Queries the dynamic status of the nth entry.
INTEGER
Returns the green value of the nth entry.
INTEGER
Returns the red value of the nth entry.
INTEGER
Returns an integer that represents a combination of the red, green, and blue values associated with the nth entry.
SET-BLUE-VALUE( ) Method
( n, int-val )
LOGICAL
Sets the blue value of the nth entry.
SET-DYNAMIC( ) Method
( n, logical-val )
LOGICAL
Whether the nth entry is
dynamic.
LOGICAL
Changes the green value of the nth entry.
SET-RED-VALUE( ) Method
( n, int-val )
LOGICAL
Changes the red value of the nth entry.
LOGICAL
Change the color of the nth entry to the specified integer which is a combination of the red, green, and blue value for that color.

EXAMPLE

This procedure sets the number of entries in the color table, makes color i + 1 dynamic, then sets the red, green, and blue values for this entry.

r-colhan.p
DEFINE VARIABLE red AS INTEGER INIT 0.
DEFINE VARIABLE blue AS INTEGER INIT 127.
DEFINE VARIABLE green AS INTEGER INIT 127.
DEFINE VARIABLE i AS INTEGER.

i = COLOR-TABLE:NUM-ENTRIES.
COLOR-TABLE:NUM-ENTRIES = i + 1.
COLOR-TABLE:SET-DYNAMIC(i, yes).
COLOR-TABLE:SET-RED-VALUE(i, red).
COLOR-TABLE:SET-GREEN-VALUE(i, green).
COLOR-TABLE:SET-BLUE-VALUE(i, blue).

DISPLAY COLOR-TABLE:GET-RED-VALUE (i). 
DISPLAY COLOR-TABLE:GET-GREEN-VALUE (i). 
DISPLAY COLOR-TABLE:GET-BLUE-VALUE (i). 

NOTE: In this procedure, you can replace the SET-RED-VALUE( ),
SET-GREEN-VALUE( ), and SET-BLUE-VALUE( ) methods with the SET-RGB-VALUE( ) method as follows:
COLOR-TABLE:SET-RGB-VALUE(i, RGB-VALUE(red, green, blue)).

NOTES

SEE ALSO

GET-KEY-VALUE Statement, PUT-KEY-VALUE Statement, SYSTEM-DIALOG COLOR Statement, USE Statement


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095