Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!osf.org!meeks From: meeks@osf.org (W. Scott Meeks) Newsgroups: comp.windows.x.motif Subject: Re: how do I left-justify the text in a push-button? Message-ID: <9105302325.AA08490@clew> Date: 30 May 91 23:25:47 GMT References: <1991May30.195137.23995@porthos.cc.bellcore.com> Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 22 >Date: 30 May 91 19:51:37 GMT >From: porthos!rruxc!wws@bellcore.com (Still Searching) > >I'm placing some XmString text, created with XmStringCreateLtoR, >in Push-Buttons which are on a bulletin board in a scrolled window. >The text is always centered in the buttons; I want it left-justified. > >I have a feeling this is happening because everything is in a Form dialog with >ATTACH_POSITION specified for all four sides of all widgets. Is there a way >to get the text to shift to the left in the buttons? Well, I generally hate to say this, but in this case, RTFM. There is a resource in XmLabel (of which XmPushButton is a subclass) called XmNalignment which can take one of three values: XmALIGNMENT_BEGINNING (which is effectively left alignment when XmNstringDirection is XmSTRING_DIRECTION_L_TO_R), XmALIGNMENT_CENTER (the default) and XmALIGNMENT_END. See the documentation on XmLabel for more information. W. Scott Meeks Open Software Foundation meeks@osf.org (617) 621-7229