Progress
Language Reference
COLOR-TABLE System Handle
A handle to the current color table.
SYNTAX
attribute
An attribute of the COLOR-TABLE handle.
method
A method of the COLOR-TABLE handle.
Method Return Type Description GET-BLUE-VALUE( ) Method ( n ) INTEGER Returns the blue value of the nth entry. GET-DYNAMIC( ) Method ( n ) 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. GET-RGB-VALUE( ) Method ( n ) 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. SET-GREEN-VALUE( ) Method
( n, int-val ) 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. SET-RGB-VALUE( ) Method
( n, int-val) 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.
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
- The current color table is the color table in the startup environment or the environment most recently specified in a USE Statement.
- To determine the number of entries in the color table, access the NUM-ENTRIES attribute. For character interfaces, the value of this attribute is zero.
- To change the number of entries in the color table, modify the NUM-ENTRIES attribute.
- To let users modify color table entries at run time, display the System Color dialog box by coding the SYSTEM-DIALOG COLOR statement.
- To specify a red, green, or blue value for a dynamic color, supply an INTEGER expression that returns a value between 0 and 255 inclusive.
- To save a color definition from the color table to the current environment, use the PUT-KEY-VALUE statement. To retrieve a color definition from the current environment, use the GET-KEY-VALUE Statement.
- The value of COLOR-TABLE:TYPE is “PSEUDO-WIDGET.”
- The SET-RGB-VALUE() and GET-RGB-VALUE() methods can be used as an alternative to specifying each individual red, green, and blue color value with the individual SET-RED-VALUE() , SET-GREEN-VALUE() , SET-BLUE-VALUE() methods, and GET-RED-VALUE(), GET-GREEN-VALUE(), and GET-BLUE-VALUE() methods, respectively.
- The SET-RGB-VALUE() and GET-RGB-VALUE() methods to set or retrieve colors are primarily used for Active X controls.
- 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
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |