Text widget does change its width and height. Why??
I'm having problems with managing a text widget in a BulletinBoard. I
have a function which comes on timer (4 seconds). In this function, I'm
setting for the text widget same X, Y, Width, Height and font. The text
that I'm writing in it is also the same. The problem is that when this
function is first called, it displays the text widget correctly, with
X, Y, W and H as I specified. But second time it puts another W and H.
Again, the third times it puts the correctly W and H (as I specified)
and so on. Practically, at every two calls of this callback timer
function, the W and H values are modified after XtSetValues. If I'm not
seting the font, the W and H values don't change !!! They remain with
the correctly values all the time, at every timer calls. So, probably
I'm doing something wrong at fontlist part.
I'm writing also the code maybe someone's got a hint. Thank you so much
for reading this .
area it is a XmText
screen_layout it's a XmBulletinBoard
void display_widgets_temp(XtPointer client_data, XtIntervalId *id)
int ac = 0;
GEOM *Geom= (GEOM*)client_data;
XtSetArg(al[ac], XmNeditable, FALSE); ac++;
XtSetArg(al[ac], XmNcursorPositionVisible, FALSE); ac++;
XtSetArg(al[ac], XmNeditMode, XmMULTI_LINE_EDIT); ac++;
XtSetArg(al[ac], XmNautoShowCursorPosition, FALSE); ac++;
XtSetArg(al[ac], XmNresizable, FALSE); ac++;
char *pszRcvdMsg = new char;sprintf(pszRcvdMsg," COMMUNICATION
XtSetArg(al[ac], XmNfontList, fontlist); ac++; //here, if i'm not
seting this fontlist it's ok at every callback on timer. still, I need
this font !
XtSetArg(al[ac], XmNx, 180); ac++;
XtSetArg(al[ac], XmNy, 140); ac++;
XtSetArg(al[ac], XmNwidth, 240); ac++;
XtSetArg(al[ac], XmNheight, 160); ac++;
XtSetValues(area, al, ac);
XmTextSetHighlight(area, 0, strlen(pszRcvdMsg), XmHIGHLIGHT_SELECTED);
(unsigned long) 4000, /* milliseconds */
Re: Text widget does change its width and height. Why??
May be you have geometry attachments with that TextWidgets, or
something of stuff, setting XmNwidth & XmNheight doesnt hardcode