thecrgrt Posted August 2, 2011 Share Posted August 2, 2011 Hi all, How do i can to make a word wrap like an insertion of newline(#10) or CR(#13) to text was displayed by using ShowMessage and MessageDlg functions? Link to comment Share on other sites More sharing options...
dionel1969 Posted August 2, 2011 Share Posted August 2, 2011 You can use "<br/>" that is the CR for the web. I use the following format: procedure ShowMessageWithAdInfo( const aMsg, aAdInfo: String ); begin ShowMessage(aError + '<br/><div align="center"> with the additional info:</div><br/>' + aAdInfo); end; It works good for the web mode. So if you need it for both mode you have to check the mode and use CrLf or <br/> PS: The <div> is used to center the middle message. Link to comment Share on other sites More sharing options...
dionel1969 Posted August 2, 2011 Share Posted August 2, 2011 BTW, and this is for Farshad or other that know about it: When I use MessageDlg with mtError, mtConfirmation, mtXXXX, appear a specific icon together with the message in VCL applications. It must appear in web applications??? Just to know. Link to comment Share on other sites More sharing options...
dionel1969 Posted August 2, 2011 Share Posted August 2, 2011 I was checking my previous reply and I found that when you call MessageDlg with that the message dialog appear good, but after first time the dialog appear so small and the text is wordwrapped vertically. Why???? What is wrong???? At the same time the CallBack Proc is not working. 25.1- Error en los Mensajes.rar Link to comment Share on other sites More sharing options...
thecrgrt Posted August 3, 2011 Author Share Posted August 3, 2011 You can use "<br/>" that is the CR for the web. I use the following format: procedure ShowMessageWithAdInfo( const aMsg, aAdInfo: String ); begin ShowMessage(aError + '<br/><div align="center"> with the additional info:</div><br/>' + aAdInfo); end; It works good for the web mode. So if you need it for both mode you have to check the mode and use CrLf or <br/> PS: The <div> is used to center the middle message. Thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now