xHarbour Reference Documentation > Function Reference |
Replaces a color value in a color string.
SetClrPair( <cColorString>, <nPos>, <cColor> ) --> cNewColorString
The function replaces the color at the ordinal position <nPos> with <cColor> and returns the modified color string. If <cColorString> has less than <nPos> colors, the return value is a null string ("").
See also: | GetClrPair(), SetColor() |
Category: | Screen functions |
Source: | rtl\color53.prg |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example demonstrates how a color value can be // replaced in a color string. PROCEDURE Main LOCAL cColor := "W/R,W/G,W/B,W+/R,W+/G,W+/B,W/BG,W+/BG" ? GetClrPair( cColor, 6 ) // result: W+/B cColor := SetClrPair( cColor, 6, "BG+/R" ) ? GetClrPair( cColor, 6 ) // result: BG+/R RETURN
http://www.xHarbour.com