Unable to position textwidget

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

3 posts / 0 new
Last post
Unable to position textwidget

Submitted by Anonymous on Mon, 12/10/2001 - 12:04. Developers
Hello all,
I am using DrawingArea widget and where i am want to attach one textwidget.
I have tried all the options to position the text box on the bottom right of window but it is coming on top left side of the window.

I have treid all the options like..

1. XtVaSetValues(text_wid,XmNbottomAttachment,XmATTACH_POSITION,XmNbottomPosition,100, XmNrightAttachment,XmATTACH_POSITION,XmrightPosition,100,NULL);

2. XtSetArg(al[ac], XmNbottomAttachment,XmATTACH_POSITION, 50); ac++;
XtsetArg(al[ac],XmNbottomPosition,100);
XtSetArg(al[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
XtSetArg(al[ac], XmNrightPosition, 50); ac++;
XtSetValues ( text_wid,al, ac );

I have tried like this but unable to position textbox according to my requirement.
Kindly help me to solve this problem
Thanks in advance

Regards
Smita

ICS_support

The XmDrawingArea doesn`t use those resources on the child to position it -- those resources are constraint resources supported by the XmForm and its subclasses. You should explicitly position the children using XtNx and XtNy values. (You may also need to reset the drawing area`s own margins to 0 in order to position its children outside the 10-pixel margin that the manager typically enforces.)

Motif has a wide range of managers widget which support different methods of positioning their children. XmForm supports the relative positioning you tried to use. XmBulletinBoard and XmDrawingArea support exact pixel placement. (XmRowColumn, by contrast, completely ignores exact pixel placement.)

And note that Xt doesn`t give you any help here. Generally, if you try to set a resource on a widget that doesn`t support it, Xt silently ignores the extra data without doing anything with it. You get similar, bad, results if you do an XtGetValues on a non-existent resource. Only for the wrong callback resources does Xt give an error message.

Anonymous

Thanks dbl...
You helped me out and solved my problem.
Thank You!!!