This is a migrated thread and some comments may be shown as answers.

how to limit the width of radmessagebox

3 Answers 234 Views
MessageBox
This is a migrated thread and some comments may be shown as answers.
Jacky
Top achievements
Rank 1
Jacky asked on 20 Aug 2014, 08:29 AM
how to limit the width of radmessagebox to force the text was shown in more lines?  it looks very long for me.

3 Answers, 1 is accepted

Sort by
0
Ralitsa
Telerik team
answered on 22 Aug 2014, 08:31 AM
Hi Jacky, 

Thank you for contacting us. 

You need to set the MaximumSize property of the label which displays the message text. Please take a look at the following code example: 
RadMessageBox.Instance.Controls["radLabel1"].MaximumSize = new System.Drawing.Size(300, 500);

I attached an image and sample project which demonstrates you the message box.
 
Should you have further questions, I would be glad to help.

Regards,
Ralitsa
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Jacky
Top achievements
Rank 1
answered on 25 Aug 2014, 08:45 AM
Hi Ralitsa,

Thanks for your help.
It doesn't work well,  you can try to click the button again to see the effect.  the two buttons are disabled.
0
Accepted
Ralitsa
Telerik team
answered on 27 Aug 2014, 08:57 AM
Hi Jacky, 

Thank you for your reply.  

I have attached the modified sample project. The solution is based on method which calculates the height of text and sets the MinimumSize and MaximumSize properties of the label. 

I hope this will help. Do not hesitate to write back with further questions.

Regards,
Ralitsa
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
MessageBox
Asked by
Jacky
Top achievements
Rank 1
Answers by
Ralitsa
Telerik team
Jacky
Top achievements
Rank 1
Share this question
or