Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!husc6!bunny!krs0 From: krs0@GTE.COM (Rod Stephens) Newsgroups: comp.windows.x.motif Subject: Re: XmATTACH_OPPOSITE_FORM Message-ID: <9805@bunny.GTE.COM> Date: 28 Sep 90 12:24:04 GMT References: <9009280016.AA05259@turnpike.Eng.Sun.COM> Distribution: inet Organization: GTE Laboratories, Waltham MA Lines: 44 In article <9009280016.AA05259@turnpike.Eng.Sun.COM> writes: >I have yet to find a purpose for this value. Can someone lend >a hand? I have used this to align 2 columns, one of labels and one of text. I wanted the labels aligned on the left and the text aligned on the right like: x = A x = B | | V V L1_____ T1_______ L2________ T2_____ L3___ T3________ L4__________ T4__________ I got this by stuff like: OBJECT label1 : XmLabel { ARGUMENTS { XmNleftAttachment = XmATTACH_FORM; XmNleftOffset = A; }; }; OBJECT text : XmText { ARGUMENTS { XmNrightAttachment = XmATTACH_OPPOSITE_FORM; XmNrightOffset = -B; }; }; Note the "-B". It took some stochastic programming (trial and error ;) to figure this little feature out. Of course there are undoubtably a zillion ways to get this to work but I knew what "A" and "B" were so this was convenient. +---------------------------------------------------------------+ | Rod Stephens | "Haven't I told you not to play | | GTE Laboratories, Inc | with my super-weapons? You might | | (617)466-4182 | devastate yourself!" | | krs0@gte.com | | +---------------------------------------------------------------+