Progress
Language Reference


COLOR Statement

Interfaces
OS
SpeedScript
All
All
No

Indicates the video attribute or color for normal display or for data entry.

SYNTAX

COLOR [ DISPLAY ] color-phrase [ PROMPT color-phrase ]
       { field ... } { [ frame-phrase ] } 

COLOR PROMPT color-phrase 
      { field ... } { [ frame-phrase ] } 

DISPLAY

Indicates that you want to use a specific color when the system displays a field.

PROMPT

Indicates that you want to use a specific color when the system prompts a user for input by an INSERT, PROMPT-FOR, SET, or UPDATE statement.

color-phrase

Specifies a video attribute or color. This is the syntax for color-phrase.

SYNTAX
{     NORMAL
   |  INPUT
   |  MESSAGES
   |  protermcap-attribute
   |  dos-hex-attribute
   |  { [ BLINK- ] [ BRIGHT- ]
         [ fgnd-color ] [ bgnd-color ]
       }
   |  { [ BLINK- ] [ RVV- ] [ UNDERLINE- ] [ BRIGHT- ]
         [ fgnd-color ]
       }
   |  VALUE ( expression ) 
} 

For more information on color-phrase, see the COLOR Phrase reference entry. Progress ignores the color-phrase entry for overlay frames on spacetaking terminals.

field

The name of the field or fields for which you want to override the default colors.

frame-phrase

Specifies the overall layout and processing properties of a frame. For more information see the Frame Phrase reference entry.

EXAMPLE

This procedure highlights the item number and on-hand fields for items with an on-hand value less than 50. The variable hilite holds the video attribute (color) for highlighting. In this case, the system uses whatever attribute is used for the message area (such as reverse video, bright, or a color).

r-color.p
DEFINE VARIABLE hilite AS CHARACTER.hilite = "messages".

  /* Use standard messages attribute to
    highlight on-hand less than 50 */
FOR EACH item:
  DISPLAY item-num item-name on-hand WITH ATTR-SPACE.
  IF on-hand < 50 THEN
    COLOR DISPLAY VALUE(hilite) item-num on-hand.
END. 

NOTES

SEE ALSO

COLOR Phrase, DISPLAY Statement, Frame Phrase


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