int TextSetColor(int tx, int color);
Set a text label's color.
Return Value
Return value is not used.
Parameters
tx Text handle returned from TextAdd().
color Color of the text label, expressed as RGB values, encoded as a hexadecimal value. e.g. 0xFF0000 represents the color red.
Remarks
The TextSetColor() function changes the color of a text label.
NOTE: This function affects only text labels that use system fonts. (e.g. Fonts created using FontAdd(font,style,points,color). Bitmap fonts are not affected by this function.)
Availability
Available in DragonFireSDK 1.2 and later.
Example
Description: This example will set up a Text object and set its color to green.
#include "DragonFireSDK.h"
int font; int text;
void AppMain() { font=FontAdd("Helvetica","Regular",18,0x777700); text=TextAdd(20,20,"Helvetica",font); TextSetColor(text,0x00FF00); }
void AppExit() {
}
void OnTimer() {
} |