Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!acorn!ixi!ixi!pd From: pd@ixi.uucp (Paul Davey) Newsgroups: comp.windows.x.motif Subject: Re: Carriage returns in Label Widget Text Message-ID: Date: 3 Aug 90 16:05:07 GMT References: <9007271707.AA23113@alphalpha.com> Sender: paul@x.co.uk (Paul Davey) Distribution: inet Organization: IXI Ltd. Lines: 39 In-Reply-To: nazgul@alphalpha.com's message of 27 Jul 90 17:07:21 GMT In article <9007271707.AA23113@alphalpha.com> nazgul@alphalpha.com (Kee Hinckley) writes: > XmStringLineCount, XmStringBaseLine, ...). Can anyone say if there is > any way to create a multi-line string except for XmStringCreateLtoR? I've always assumed that's what XmStringSeparatorCreate does, although I've never tried it. Yes, alternatively XmStringSegmentCreate allows a separator to be created at the same time as a character set segement. The following code creates separators after word0 and word2. If you place it in a label you get something like +-----------+ |word0 word1| | word2 | +-----------+ s0=XmStringSegmentCreate("word0",XmSTRING_DEFAULT_CHARSET, XmSTRING_DIRECTION_L_TO_R,FALSE); s1=XmStringSegmentCreate("word1",XmSTRING_DEFAULT_CHARSET, XmSTRING_DIRECTION_L_TO_R,TRUE); s1=XmStringConcat(s0,s1); s2=XmStringSegmentCreate("word2",XmSTRING_DEFAULT_CHARSET, XmSTRING_DIRECTION_L_TO_R,TRUE); string=XmStringConcat(s1,s2); The separator after word2 has no apparent effect. Multiple separators have the effect of one. -- Regards, pd@x.co.uk IXI Limited Paul Davey pd@ixi.uucp 62-74 Burleigh St. ...!uunet!ixi!pd Cambridge U.K. "These are interesting times" +44 223 462 131 CB1 1OJ