Thanks Sergey,
I was sure I had done something like this in the past but couldn't find the code for reference anywhere.
Thanks for your help!
Rodd
>>Is there any way to limit the width of a messagebox? In other words, if I pass a rather long message as the message text, rather than the messagebox stretching out the width of my screen, I'd like it to display only about 70 characters per line and do wordwrap on anything longer.
>>
>>Is there any kind of function or routine that will take a string and add the chr(10) + chr(13) at the right places to give you a "text-wrapped" string to pass to Messagebox()?
>
>
>lcText = "Is there any way to limit the width of a messagebox? " + ;
> "In other words, if I pass a rather long message as the message text, " + ;
> "rather than the messagebox stretching out the width of my screen, " + ;
> "I'd like it to display only about 70 characters per line and do wordwrap on anything longer."
>
>lnMemowith = SET("Memowidth")
>SET MEMOWIDTH TO 70
>lcNewText = ""
>FOR i=1 TO MEMLINES(lcText)
> lcNewtext = lcNewText + MLINE(lcText,i) + CHR(13)
>ENDFOR
>lcNewtext = LEFT(lcNewtext, LEN(lcNewtext )-1)
>SET MEMOWIDTH TO (lnMemowith)
>MESSAGEBOX(lcNewtext )
>