1. MLE Text - Format
- Posted by Tony Steward <tsteward at dodo.com.au> Apr 25, 2003
- 403 views
This is a multi-part message in MIME format. ------=_NextPart_000_0000_01C30B64.B1F90CF0 charset="us-ascii" Hello all, If I have a sequence temp = {"hello world", "I love yous", "all"} and I want to put all this into an MLE with each part of the sequence on a separate line, how do I do it? Or should I not be using MLE? I have tried the following flow ... program started etc. etc. save to database >> temp[1] & "\n" & temp[2] & "\n" & temp[3] -- I only want one sequence in the database ... program does other things etc. etc. load data from database into temp setText(MyMLE, temp) but alas I just get black lines for the "\n" line feed. However this works fine for the printer that's why I wonder if I should be using MLE or something else. BTW temp is a sequence stored in a database as shown above with the linefeeds already imbedded. Using win32 V58.5, WINXP Thanks Tony Steward ------=_NextPart_000_0000_01C30B64.B1F90CF0 Content-Type: application/x-pkcs7-signature; name="smime.p7s"
2. Re: MLE Text - Format
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Apr 25, 2003
- 421 views
a a a a aa a a Hi Tony, I noticed this exact problem just last week. Use a RichEdit control instead of an MleText. Pete
3. Re: MLE Text - Format
- Posted by Greg Haberek <g.haberek at comcast.net> Apr 25, 2003
- 420 views
> but alas I just get black lines for the "\n" line feed. However this > works fine for the printer that's why I wonder if I should be using MLE > or something else. > Quite a simple fix! MLE text needs a CRLF to make a new line, not just an LF. For those who don't know, '\r' is carriage-return (CR) and '\n' is line-feed (LF). so rather than putting just '\n' after each line, put "\r\n" and that will solve the problem. I usually do this: -- begin sample code -- global constant CRLF = "\r\n" global procedure putLines( integer id, sequence lines ) -- writes a sequence of lines to an MLE text sequence outText outText = "" for i = 1 to length(lines) do outText &= lines[i] & CRLF end for setText( id, outText ) end procedure global procedure addLines( integer id, sequence lines ) -- same as putLines() but appends, rather than overwrites sequence outText outText = getText( id ) & CRLF for i = 1 to length(lines) do outText &= lines[i] & CRLF end for setText( id, outText ) end procedure -- end sample code --