Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!ub!uhura.cc.rochester.edu!rochester!bbn.com!news From: news@bbn.com (News system owner ID) Newsgroups: comp.windows.x.motif Subject: How do I center a widget inside an XmForm? Message-ID: <64526@bbn.BBN.COM> Date: 5 Jun 91 21:28:26 GMT Reply-To: rnewman@BBN.COM (Ron Newman) Organization: Bolt Beranek and Newman Inc., Cambridge MA Lines: 21 I've been looking over the dazzling array of attachment options available in XmForm, but I can't figure out how to position a child widget (a Label, for instance) in either of the following ways: - attach the CENTER of the widget to the CENTER of the form, in either the x or y dimensions (or both) - attach it to an adjoining widget (say, a Button) so that the CENTER of the Button touches the CENTER of the Label The XmATTACH_WIDGET, XmATTACH_FORM, and XmATTACH_OPPOSITE_WIDGET all seem to force me to attach corners and edges, rather than centers. The XmATTACH_POSITION option would let me center my Label (by using the same value for both leftPosition and rightPosition), but then I get a label that grows and shrinks as the form grows or shrinks. I want a label that stays the same size but whose location changes so that it remains in the center. /Ron Newman rnewman@bbn.com Ron Newman rnewman@bbn.com