%GetStTextRGB function


Function
The function gets back a color defined in the object configuration of the Status text type.
Declaration
INT %GetStTextRGB(
   HBJ in _h
   INT in _index
  BOOL in bForeground
 )
Parameters
_hA unique identifier of object of the Status text type. It can be acquired as attribute \HBJ.
_indexIndex into list of values with defined colors of foreground and background.
bForegroundRequired color. @TRUE - foreground color, @FALSE - background color.
Description

The values of parameter index can be within the range from 0 to %GetStTextRange+1 for status texts and its configuration parameter "Text usage" is set on "Values".
Zero value (0) is in accordance with the color at field LOW and the value %GetStTextRange+1 is in accordance with the color at field HIGH.
Value of index -1 gets back a predefined color.
Different value of index generates an error ERR_RANGE_ERROR. If the proper color component for required index is not defined, the function gets back the invalid value.

The following rule can be applied for really displayed color: If the color is not defined for proper index (>=1), the color with index -1 will be used.

Napíšte komentár