smanandh@MEDIA-LAB.MEDIA.MIT.EDU (Sanjay Manandhar) (01/08/89)
Here is a novice's question: Aren't XtNx, XtNy used as offset for a widget from the top-left corner of its parent widget? I am trying to put a form widget(which has other widgets inside it) in the middle of a viewport widget. I am providing the coordinates of the offsets by doing: ........ ....... ..... ........ ....... ..... XtSetArg( arg[3], XtNx, 200); XtSetArg( arg[4], XtNy, 100); ....... ........ ..... ....... ........ ..... Why do all the widgets gravitate towards the top left corner? Thanx. sanjay manandhar
kit@ATHENA.MIT.EDU (Chris D. Peterson) (01/12/89)
> Aren't XtNx, XtNy used as offset for a widget from the > top-left corner of its parent widget? Yes, but as with all communication between parent and child, everything that the child says may be overridden by the parent. This is what you are probabally seeing. The Viewport, for instance, insists that its children be in the upper-left corner, and take up at least all the visable space on the screen. Chris D. Peterson MIT X Consortium / Project Athena Net: kit@athena.mit.edu Phone: (617) 253 - 1326 USMail: MIT - Room E40-321 77 Massachusetts Ave. Cambridge, MA 02139