Programming with Reflection

image\rwnprg32.gif ForegroundColor method

 

Syntax MyForeground = object.ForegroundColor(Attribute)

 

Description

Returns the foreground text color for a particular host attribute. For example, the following statements assign the current value for underline text to the variable underlineText:

Dim underlineText As Integer

underlineText = Session.ForegroundColor(rcUnderlineAttribute)

Arguments

Attribute Argument type: Enumeration
Identifies the host attribute value (such as plain or underlined text). The values are:

 rcPlainAttribute
rcBlinkAttribute
rcInverseAttribute
rcUnderlineAttribute
rcBoldAttribute (for UNIX and OpenVMS hosts)
rcHalfbrightAttribute (for HP hosts)
rcFunctionKeys (for HP hosts)
rcHotspotAttribute
rcCursorAttribute

 These values (except rcPlainAttribute and rcFunctionKeys) can be added together to return color values for combined attributes (such as Bold Inverse and Underline Blink). For example, the following expression returns the foreground color for text with the Inverse Blink attribute:

      .ForegroundColor(rcInverseAttribue+rcBlinkAttribute)

Returns

MyForeground Return type: Enumeration
This method returns an integer value between 0 and 15. These values are equal to one of the following predefined constants. (Note: The numeric values of these constants are not related to the position a color occupies in the Color Setup dialog box. To avoid confusion, always refer to colors using the predefined constants.)

rcWhite
rcGrey
rcRed
rcBlue
rcGreen
rcYellow
rcCyan
rcMagenta
rcBlack
rcDkGrey
rcDkRed
rcDkBlue
rcDkGreen
rcDkYellow
rcDkCyan
rcDkMagenta
rcOtherColor

 

 

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command