Previous Next

COLOR-TABLE system handle

(Windows only; Graphical interfaces only)
A handle to the current color table.
Note:
Syntax 
 
COLOR-TABLE [ :attribute | :method ]
attribute
An attribute of the COLOR-TABLE handle.
method
A method of the COLOR-TABLE handle.
Attributes
 
Methods
 
Example 
This procedure sets the number of entries in the color table, makes color ix + 1 dynamic, then sets the red, green, and blue values for this entry:
 
DEFINE VARIABLE red   AS INTEGER NO-UNDO.
DEFINE VARIABLE blue  AS INTEGER NO-UNDO INITIAL 127.
DEFINE VARIABLE green AS INTEGER NO-UNDO INITIAL 127.
DEFINE VARIABLE ix    AS INTEGER NO-UNDO.
 
ix = COLOR-TABLE:NUM-ENTRIES
COLOR-TABLE:NUM-ENTRIES = ix + 1.
 
COLOR-TABLE:SET-DYNAMIC(ix, TRUE).
COLOR-TABLE:SET-RED-VALUE(ix, red).
COLOR-TABLE:SET-GREEN-VALUE(ix, green).
COLOR-TABLE:SET-BLUE-VALUE(ix, blue).
 
DISPLAY COLOR-TABLE:GET-RED-VALUE(ix).
DISPLAY COLOR-TABLE:GET-GREEN-VALUE(ix).
DISPLAY COLOR-TABLE:GET-BLUE-VALUE(ix).
Note:
Notes 
*
*
*
*
*
*
*
*
*
*
The index is zero based. For example, the statement COLOR-TABLE:GET-BLUE-VALUE(2) returns the color of the 3rd entry.
See also 
GET-KEY-VALUE statement, PUT-KEY-VALUE statement, SYSTEM-DIALOG COLOR statement, USE statement

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.