VSetTextValue
Name
VSetTextValue - sets the value of a Text (Tablet) Item.
Synopsis
VSetTextValue(item, value)
TEXT *item;
char *value;
Description
VSetTextValue sets the value of a Text (Tablet) Item.
Structures
typedef struct _text {
Window win; /*window in which item resides*/
GC *gc;
int x,y; /*location of upper-left corner of item*/
int w; /*width of the total item area in fonts*/
int h; /*height of the total item area in PIXELS*/
short label_width; /*width of label in pixels*/
short label_height; /*height of label*/
short label_ascent; /*ascent dimension of font*/
short label_x; /*position of the label*/
short label_y;
int thick; /*thickness of the frame of the item*/
int width; /*current width of item in pixels*/
int fw,fh; /*size of font*/
char label[150]; /*label of the text item*/
char value[200]; /*value of the text item*/
int pos; /*pos indicates the index of the first VALUE*/
int state; /*indicates if text item is OFF(0) or ON(1)*/
int mode; /*text item is DISABLED(0) or ENABLED (1)*/
int (*func)(); /*notify procedure*/
struct _text *next; /*next text item*/
XFontStruct *font_struct; /*Font used on the window*/
} TEXT;
Return Value
0 - work successfully.
266 - invalid Text Item ID.
Parameters
item - Text Item ID.
value - character string of the new value.
Side Effect
None.
Entry Conditions
VCreateColormap should be called earlier, else VSetTextValue prints an
error message to the standard error stream, produces a core dump file and
exits from the current process.
Related Functions
VAddText,
VCheckTextEvent,
VGetTextValue,
VGetTextIdByLabel.