SAS Component Language Dictionary |
Category: | Widget or Field |
Syntax |
rc=FLDCOLOR(wcol-name,color,attribute,start,length); |
contains the return code for the operation:
0 | |
0 |
specifies the field, text entry widget, or text label widget to be changed.
specifies either a color name, or '' to retain the current color. Colors are BLACK, BLUE, BROWN, CYAN, GRAY, GREEN, MAGENTA, ORANGE, PINK, RED, WHITE, and YELLOW. SASCOLOR window elements can also be used for color.
specifies either a display attribute, or '' to retain the current attribute. Attributes are NONE, BLINKING, HIGHLIGHT, HIREV, REVERSE, and UNDERLINE. If you specify a SASCOLOR window element for color, then attribute is ignored because the SASCOLOR window element contains a display attribute. However, you must specify a placeholder ('') for attribute when you specify arguments after it.
specifies the position in the field at which to begin applying the specified color and display attributes.
specifies the number of positions to which the specified color and display attributes are to be applied.
Details |
FRAME entry widgets can also use the _setColor method.
To change the color for the entire field or FRAME entry widget, you can use the FIELD function.
Examples |
Change the color of the third through seventh character positions in field ABC to red, and change the display attribute of those positions to high intensity:
rc=fldcolor('abc','red','highlight',3,5);
Change the color of a field, but leave the attributes the same:
rc=fldcolor('abc','red','',3,7);
Change the color of a field, using a SASCOLOR window element:
rc=fldcolor('abc','foreground','',3,7);
See Also |
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.