thecrgrt Posted August 2, 2011 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? Quote
dionel1969 Posted August 2, 2011 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. Quote
dionel1969 Posted August 2, 2011 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. Quote
dionel1969 Posted August 2, 2011 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 Quote
thecrgrt Posted August 3, 2011 Author 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.