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

RadMessageBox questions

23 Answers 518 Views
MessageBox
This is a migrated thread and some comments may be shown as answers.
Ofer
Top achievements
Rank 1
Ofer asked on 05 May 2009, 08:46 PM
Hi,

We evaluate Q1 2009 Winforms controls with VS2008 SP1.

1) How to change RadMessageBox title font?

2) How to change RadMessageBox message font?

3) Does the RadMessageBox plays error / success sounds according to the MessageBoxIcon like the .Net MessageBox.Show ?

4) The documentation application that comes with the WinForms doesn't have an entry for RADmessagebox - where to find documentation?

5) Does the RADmessagebox support HTML?  I tried <b> and </b> tags but they are shown.

6) The localization feature of the RADmessagebox buttons text is very nice :-)

Thank you!
    

23 Answers, 1 is accepted

Sort by
0
Andrea
Top achievements
Rank 2
answered on 07 May 2009, 09:07 AM
" 6) The localization feature of the RADmessagebox buttons text is very nice :-) "

How it works?

Thanks
0
Andrea
Top achievements
Rank 2
answered on 07 May 2009, 03:24 PM
I found the solution in documentation!

Ciao
0
Martin Vasilev
Telerik team
answered on 08 May 2009, 04:17 PM
Hi Ofer,

Thank you for writing. Up to your questions:

1 and 2) You can customize the Font by creating and applying the custom theme for RadMessageBox. Please, find more info in the following KB article.
3) The RadMessageBox plays same sounds, as MessageBox.
4) You can find details about using RadMessageBox in our help.
5) The RadMessageBox supports html formatting. Just add <html> tag before the text:
 
Telerik.WinControls.RadMessageBox.Show(this"<html>This is a <b>bold text</b> \n"); 
 
6) Thank you for the feedback. You can find info how to use localization provider in our help.

Do not hesitate to contact me again if you have other questions.

Regards,
Martin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Paul Lancaster
Top achievements
Rank 1
answered on 08 Feb 2010, 05:23 PM
Hi,
the HTML support feature is simple and a great idea, congratulations.
But..have limitations? example that not work:

RadMessageBox.Show(this"<html>This is a <font size=4><b>bold text</b></font> \n");

something like that happend too with font family, colors, etc.

Anolther problem that i found:

If you use html syntax in the title section, works fine, but have a problem with "\n":
the problem is that buttons are no more visible  because of successive use of "\n".

Regards.
0
Martin Vasilev
Telerik team
answered on 10 Feb 2010, 02:14 PM
Hello Paul Lancaster,

Thank you for contacting us. Please, take a look at our documentation for a list of the supported tags in our html-liking formatting. If you want to set text size, you have to use <size=4> instead <font size=4>:

RadMessageBox.Show(this, "<html>This is a <size=4><b>bold text</b>\n");

Write me back if you have any other questions.

Best wishes,
Martin Vasilev
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Sayed
Top achievements
Rank 1
answered on 05 Dec 2012, 03:18 PM
When i use HTML tags with Arabic messages it gets messed up ... the words should be read from right to left but after using HTML tags it reverted to left to right... how can i fix it?

It happens only with the message text ... but it is working fine with the message caption?!!!
0
Boryana
Telerik team
answered on 10 Dec 2012, 04:34 PM
Hello Sayed,

Thank you for writing.

Currently, html-like formatting does not support right-to-left languages. I have added this as a feature request to our Public Issue Tracker under ID 13709. To vote for it and subscribe for its status updates, follow this link: http://www.telerik.com/support/pits.aspx#/public/winforms/13709. We will do our best to implement the functionality in a future release. Your Telerik points have been updated for this request.

Let me know if you encounter any further issues using our controls. I will do my best to assist you.

Kind regards,
Boryana
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
0
Sayed
Top achievements
Rank 1
answered on 11 Dec 2012, 08:21 PM
Thanks for your answering.
May i ask why HTML-Like formatting is supporting in the Title of the rad message box but not in the message body itself?
0
Boryana
Telerik team
answered on 14 Dec 2012, 09:51 AM
Hello Sayed,

Thank you for writing back.

The RadLabel in the RadMessageBox body has a TextWrap property set to true. If you set the property to false, the text will be displayed as in the caption:
private void radButton1_Click(object sender, EventArgs e)
{
    RadLabel label = RadMessageBox.Instance.Controls[1] as RadLabel;
    if (label != null)
    {
        label.TextWrap = false;
    }
    RadMessageBox.Show(this, "<html>واحد اثنان ثلاثة أربعة خمسة\n", "<html>واحد اثنان ثلاثة أربعة خمسة\n");
}

Using the above approach, however, eliminates the text wrapping which might be inconvenient for many scenarios. The reason our HTML-rendering mechanism does not work with enabled TextWrap is purely
missing  implementation. This is why I have added this behavior as a feature request to our Public Issue Tracker.

I hope you find this information useful. Let me know if you have further queries.

Greetings,
Boryana
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
0
Sayed
Top achievements
Rank 1
answered on 02 Feb 2013, 12:02 PM
One more question, please ... How to set the RadMessageBox to be displayed as TopMost window?
0
Anton
Telerik team
answered on 06 Feb 2013, 06:35 PM
Hello Sayed,

Thank for the question.

Currently RadMessageBox inherits this property from its owner and to achieve this you should set the TopMost property of the owner control:

this.TopMost = true;
RadMessageBox.Show(this,"text");

However, if you don't want the owner of RadMessageBox to be top most as well, you should use RadMessageBoxForm instead of RadMessageBox. Here is a sample:

RadMessageBoxForm form = new RadMessageBoxForm();
 
form.DialogResult = DialogResult.No;
form.RightToLeft = RightToLeft.No;
form.MessageText = "Text";
 
form.StartPosition = FormStartPosition.CenterParent;
 
form.Owner = this;
 
form.MessageIcon = null;
form.ButtonsConfiguration = MessageBoxButtons.YesNo;
form.DefaultButton = MessageBoxDefaultButton.Button1;
 
form.TopMost = true;
 
form.ShowDialog();

I hope it helps.

Greetings,
Anton
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
0
Sayed
Top achievements
Rank 1
answered on 06 Feb 2013, 06:53 PM
Thanks for your reply... I will try it tomorrow :) 
Just a question... What if its owner is a UserControl? 
0
Anton
Telerik team
answered on 11 Feb 2013, 10:10 AM
Hi Sayed,

Thank you for writing back.

The Show method of RadMessageBox is designed to accept owner from type IWin32Window. So every class that implements this interface can be owner of RadMessageBox. This interface is fundamental for every win forms type including UserControl. This mean that will not have any problems to use RadMessageBox with UserControl.

I hope this helps.

Greetings,
Anton
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
0
moftol
Top achievements
Rank 1
answered on 24 Mar 2013, 01:26 PM
Dears,

I have a problem i am using Telerik windows form rad message box and display arabic text in the rad message box, but the problem is  that text wrap to second line and is not visible, the same text is working fine when i use .NET Core MessageBox.

any suggestions.

Thanks you.
0
Anton
Telerik team
answered on 27 Mar 2013, 02:54 PM
Hi Farooq,

We kindly ask you to use just one support channel to contact us. Posting the same questions numerous times slows down our response time because we will need to review and address two or more tickets instead of one. Moreover threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread.

Your question has already been answered in the forum thread: http://www.telerik.com/community/forums/winforms/forms-and-dialogs/radmessagebox-large-text-height-problem.aspx

Should you have any other questions, I will be glad to assist you

All the best,
Anton
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
0
Gaurav
Top achievements
Rank 1
answered on 06 Jun 2014, 03:09 PM
How do you center a line in RadMessageBox

I tried the following but it didn't work.
RadMessageBox.Show("<html><center><b>Disclaimer</b></center></html>");
RadMessageBox.Show("<html><div align=\"center\"><b>Disclaimer</b></div></html>");
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 11 Jun 2014, 01:09 PM
Hello Gaurav,

Thank you for writing.

You can adjust the text position in the RadMessageBox, setting the appropriate padding:
RadLabel label = RadMessageBox.Instance.Controls["radlabel1"] as RadLabel;
label.Padding = new Padding(60, 0, 0, 0);
 
RadMessageBox.Show("<html><b>Disclaimer</b>");

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Desislava
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
Pawan
Top achievements
Rank 1
answered on 21 Oct 2016, 07:48 AM

Hello,

How can i change the size of RadMessageBox and its Buttons for all application Winforms?

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 21 Oct 2016, 11:55 AM
Hello Pawan,

Thank you for writing.  

RadMessageBox is auto-sized according to the text that is being displayed. Each time the RadMessageBox is shown, the MinimumSize is internally updated measuring the text. If you need to have a specific size for the window, feel free to use RadForm.

However, you can change the default size of the buttons by using the following code snippet:
 
RadMessageBox.Instance.ButtonSize = new System.Drawing.Size(50, 50);

I hope this information helps. Should you have further questions I would be glad to help.

Regards,
Dess
Telerik by Progress
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
0
Leonardo
Top achievements
Rank 1
answered on 18 Aug 2017, 07:57 PM
How can I change the texts of the buttons of the RadMessageBox?
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 21 Aug 2017, 08:01 AM
Hello Leonardo, 

Thank you for writing.  

In order to change the buttons' text, you can use a RadMessageLocalizationProvider http://docs.telerik.com/devtools/winforms/forms-and-dialogs/messagebox/localization 
 
I hope this information helps. Should you have further questions I would be glad to help.

Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Ras Ran
Top achievements
Rank 2
Iron
Veteran
Iron
answered on 04 Dec 2018, 05:58 AM
how to change radmessgebox Button color and title bar color ??
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 04 Dec 2018, 11:35 AM
Hello, Raneesras,

Your question has already been answered in the other thread you have opened on the same topic. Please, see our answer there for more information.
We kindly ask you to use just one thread for a specific problem to contact us. Posting the same questions numerous times slows down our response time because we will need to review and address two or more tickets instead of one. Moreover, threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread.

Thank you for your understanding.

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
MessageBox
Asked by
Ofer
Top achievements
Rank 1
Answers by
Andrea
Top achievements
Rank 2
Martin Vasilev
Telerik team
Paul Lancaster
Top achievements
Rank 1
Sayed
Top achievements
Rank 1
Boryana
Telerik team
Anton
Telerik team
moftol
Top achievements
Rank 1
Gaurav
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Pawan
Top achievements
Rank 1
Leonardo
Top achievements
Rank 1
Ras Ran
Top achievements
Rank 2
Iron
Veteran
Iron
Share this question
or