Board index » delphi » Multiple Lines or Carriage Return in a Message Dialog?

Multiple Lines or Carriage Return in a Message Dialog?

How can I split the message using the ShowMessage() or MessageDlg()
functions?

I want to format the message to have two or three multiple lines instead
of One long lined dialog?

Any help would be greatly appreciated..

Rkr
--

          \|||/
          /'^'\
         ( 0 0 )
-----oOOO--(_)--OOOo----------
Reid Roman
E-Mail : rkro...@pacbell.net
Delphi Enthusiast, Hobbiest ..
U.S.A
------------------------------

 

Re:Multiple Lines or Carriage Return in a Message Dialog?


use #13#10 in the string
eg
messagedlg('this'#13#10'is'#13#10'is my dialog',mterror,[mbOK],0);
or
messagedlg('this'+#13+#10+'is'+#13+#10+'is my dialog',mterror,[mbOK],0);

In article <33F7561E.55029...@pacbell.net>, Reid Roman
<rkro...@pacbell.net> writes

Quote
>How can I split the message using the ShowMessage() or MessageDlg()
>functions?

>I want to format the message to have two or three multiple lines instead
>of One long lined dialog?

>Any help would be greatly appreciated..

>Rkr

Kind Regards
Claire

Re:Multiple Lines or Carriage Return in a Message Dialog?


Try this...

MessageDlg('This is a multi-lined'#13'dialog that is split
over'#13'three lines', <other parameters go here>);

Sly (Steve)

On Sun, 17 Aug 1997 12:50:54 -0700, Reid Roman <rkro...@pacbell.net>
wrote:

Quote
>How can I split the message using the ShowMessage() or MessageDlg()
>functions?

>I want to format the message to have two or three multiple lines instead
>of One long lined dialog?

>Any help would be greatly appreciated..

>Rkr

Sly
sly(no.spam.thankyou) @ oznetcom.com.au

Re:Multiple Lines or Carriage Return in a Message Dialog?


On Sun, 17 Aug 1997 12:50:54 -0700, Reid Roman <rkro...@pacbell.net>
wrote:
showmessage('This message has three lines'+#13+#10+'here is the'+
'seond line'+#13+#10+'and here is the third line');

If you are using a message box that requires a pchar type, simply
typecast your expression       pchar('hello'+' there')

Quote
>How can I split the message using the ShowMessage() or MessageDlg()
>functions?

>I want to format the message to have two or three multiple lines instead
>of One long lined dialog?

>Any help would be greatly appreciated..

>Rkr
>--

>          \|||/
>          /'^'\
>         ( 0 0 )
>-----oOOO--(_)--OOOo----------
>Reid Roman
>E-Mail : rkro...@pacbell.net
>Delphi Enthusiast, Hobbiest ..
>U.S.A
>------------------------------

--
Peter Neuendorffer  
pet...@user1.channel1.com
Green Line Software  
http://www.channel1.com/users/petern

Re:Multiple Lines or Carriage Return in a Message Dialog?


Quote
Reid Roman <rkro...@pacbell.net> wrote:
>How can I split the message using the ShowMessage() or MessageDlg()
>functions?
>I want to format the message to have two or three multiple lines instead
>of One long lined dialog?
>Any help would be greatly appreciated..
>Rkr
>--

Do it like this ...

MessageDlg('First line in dialog.' + #13 +
     'Second line.', mtInformation, [mbOk], 0);

John

Quote
>          \|||/
>          /'^'\
>         ( 0 0 )
>-----oOOO--(_)--OOOo----------
>Reid Roman
>E-Mail : rkro...@pacbell.net
>Delphi Enthusiast, Hobbiest ..
>U.S.A
>------------------------------

--
My mind is not for rent
To any god or government

John Merrit (john.mer...@net4all.be)

Other Threads