OutputDocument.SetTextColor

Prototypes

void SetTextColor( int nColor )

void SetTextColor( int nRed, int nGreen, int nBlue )

Parameters

int nColor
A predefined constant specifying the desired color. The valid values are BLACK, BLUE, BROWN, CHARCOAL, CREAM, CYAN, GOLD, GRAY, GREY, GREEN, LILAC, LIME, MAGENTA, MAROON, OLIVE, ORANGE, PINK, PURPLE, RED, ROSE, SALMON, STEEL, TAN, VIOLET, WHITE, and YELLOW.

int nRed, nGreen, nBlue
An RGB specification of the desired color. Each parameter must be an integer in the range [0, 255]. Examples: the triplet (0, 0, 0) represents black; the triplet (255, 255, 255) represents white.

Remarks

This method sets the color of subsequent textual output.

The default text color is the color used by Windows for displaying text in a window.

Example
x = ranuni( 1:5 );
print x;

declare OutputDocument doc = OutputDocument.GetDefault();
doc.SetTextSize( 22 );
doc.SetTextColor( RED );
print "Some important message";
doc.SetTextDefaultFont();

x = ranuni( 1:5 );
print x;
See Also

OutputDocument.SetTextDefaultColor
OutputDocument.SetTextFont