%GetStTextRGB function


Function
The function gets back a color defined in object configuration of Status text type.
Declaration
INT %GetStTextRGB(
   HBJ in _h
   INT in _index
  BOOL in bForeground
 )

Parameters
_h Unique identifier of object of Status text type. it can be acquired as attribute \HBJ.
_index Index into list of values with defined colors of foreground and background.
bForeground Required color. @TRUE - foreground color, @FALSE - background color.

Description

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.

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