wiki:Docs/Prog/Manual/ApplicationLibraries/lib825ev/Display/SetCurColor

Version 2 (modified by Don Wilson, 14 years ago) ( diff )

--

SetCurColor

Sets the foreground color

int SetCurColor(int nColor);

Parameters

  • nColor - index value to color - most often will use define such as COLOR_INFO COLOR_OPTION COLOR_REQUEST COLOR_ERROR COLOR_ATTENTION COLOR_HELP

Return Value

  • Returns the index of the previous current color.

Remarks

  • Text may contain carriage returns to cause current position to drop to next line and left of screen. For example, "Hello\rWorld" will cause "Hello" to be displayed at the currect cursor location and "World" to be displayed one line down and at the left of the display.

Examples

SetCurColor(COLOR_ERROR);
PrintLCD("Error - No paper in printer");
int nOldColor;
nOldColor = SetCurColor(COLOR_ERROR);
PrintLCD("Error");
SetCurColor(nOldColor);

See Also

Note: See TracWiki for help on using the wiki.