int TextSetText(int tx, char *text);
Set new text in an existing text label. Use TextAdd() to create a text label.
Return Value
Return value is not used.
Parameters
tx Text label to be modified.
text New text to display.
Remarks
The TextSetText() function changes the text in a text label. Use TextAdd() to create a text label. The string passed to TextAdd() specifies the maximum length of any string that can be held by the text label created. If the value specified in the text parameter exceeds the length of the string allocated in TextAdd() the new string will not be displayed, since it will not fit in the space allocated by TextAdd().
Availability
Available in DragonFireSDK 1.0 and later.
Example
Description: This program will add a text label called Score, set its text to "100" then change it to "200".
#include "DragonFireSDK.h"
int FontMedium; int Score;
void AppMain() { FontMedium = FontAdd("FontMedium"); Score = TextAdd(0, 0, "100", FontMedium); TextSetText(Score, "200"); }
void AppExit() {
}
void OnTimer() {
} |