Completed
Last Updated: 04 Apr 2019 15:29 by Dimitar
Release R2 2019 (LIB 2019.1.408)
George C.
Created on: 22 Mar 2019 17:12
Category: Forms/Dialogs/Templates
Type: Bug Report
2
RadMessageBox: html-like-text-formatting problem
I want to use supported html tags in my radmessagebox . When the messagebox is shown for the first time , everything is ok.
But there is a problem when the messagebox is shown for the second time :



when I click the same button that shows the messagebox ( for the second time ), the messagebox's width increases for no reason.



I attached a picture that illustrates the messagebox shown for the second time.

P.S I tested the radmessagebox without html tags , everything works fine. Whatever the problem cause is , it is related to html tags.
Attached Files:
2 comments
Dimitar
Posted on: 04 Apr 2019 15:29
Hello, 
 
A Fix will be available in LIB Version 2019.1.408 scheduled for April 8th.

Regards, 
Dimitar
ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 26 Mar 2019 16:01
Hello, George,  

It seems to be an issue with RadMessageBox. I have logged it in our feedback portal by making this thread public. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.

I have also updated your Telerik points.

Currently, the possible solution that I can suggest is to store the initial size of the message and restore it when showing the next times: 

public RadForm1()
{
    InitializeComponent();
    RadMessageBox.Instance.SizeChanged += Instance_SizeChanged;
    RadMessageBox.Instance.FormClosed += Instance_FormClosed;
}
 
Size s = Size.Empty;
 
private void Instance_FormClosed(object sender, FormClosedEventArgs e)
{
    s = RadMessageBox.Instance.Size; 
    RadMessageBox.Instance.FormClosed -= Instance_FormClosed;
}
 
private void Instance_SizeChanged(object sender, EventArgs e)
{
    if (s != Size.Empty && RadMessageBox.Instance.Size.Width != s.Width)
    {
        RadMessageBox.Instance.SizeChanged -= Instance_SizeChanged;
        RadMessageBox.Instance.Size = s;
        RadMessageBox.Instance.SizeChanged += Instance_SizeChanged;
    }
    Console.WriteLine(RadMessageBox.Instance.Size);
}
 
private void radButton1_Click(object sender, EventArgs e)
{
    RadMessageBox.Show(@"<html><size=12>This is RadLabel <br><b><font=Arial>Arial, Bold</b><br><i><color= Red>" +
                       @"<font=Times New Roman>Times, Italic <u>Underline</u><br><size=9>Size = 9<br><color= 0, 0, 255>Sample Text");          
}

Note that most of the forum threads are reviewed by Telerik representatives and sometimes we address the questions asked by our customers in the forums as well. However, a post in the forum doesn't guarantee you a response from the Telerik support team. 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.

I hope this information helps.

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.