Re: to get the height of a Text widget - Motif
This is a discussion on Re: to get the height of a Text widget - Motif ; > int height;
> w = XtVaCreateManagedWidget("w",
> xmTextWidgetClass, wgt_Form,
> /* XmNheight, 20,*/
> NULL);
> XtVaGetValues(w,XmNheight,&height,NULL);
> printf("text height=%d",height);
>
> When I set the XmNheight value I see that the display is modifiied
> accordingly. If no ...
-
Re: to get the height of a Text widget
> int height;
> w = XtVaCreateManagedWidget("w",
> xmTextWidgetClass, wgt_Form,
> /* XmNheight, 20,*/
> NULL);
> XtVaGetValues(w,XmNheight,&height,NULL);
> printf("text height=%d",height);
>
> When I set the XmNheight value I see that the display is modifiied
> accordingly. If no value is set, there is a default value that is used.
> I want to know what is this value and use the XtVaGetValues command to get
> it, but the result is wrong : height = 20312100
>
> What is wrong ?
Should be:
Dimension height;
It is not an int, X Window sizes are short ;-)
Best regards,
Dusan Peterc
Arahne, d.o.o.
http://www.arahne.si
-
Re: to get the height of a Text widget
Thank you, it runs as expected.
I am confused because it is an error from beginner !
"arahne" a écrit dans le message de
news:41EFD366.C0E127C3@arahne.si...
> > int height;
> > w = XtVaCreateManagedWidget("w",
> > xmTextWidgetClass, wgt_Form,
> > /* XmNheight, 20,*/
> > NULL);
> > XtVaGetValues(w,XmNheight,&height,NULL);
> > printf("text height=%d",height);
> >
> > When I set the XmNheight value I see that the display is modifiied
> > accordingly. If no value is set, there is a default value that is used.
> > I want to know what is this value and use the XtVaGetValues command to
get
> > it, but the result is wrong : height = 20312100
> >
> > What is wrong ?
>
> Should be:
> Dimension height;
>
> It is not an int, X Window sizes are short ;-)
>
> Best regards,
>
> Dusan Peterc
> Arahne, d.o.o.
> http://www.arahne.si