Hi Support,
I just upgrade my winform plugin version from 2018.1.220.40 to 2020.1.218.40. I notice the popup display for RadMessage has shifted from center of the open form to center of the mdiForm (main application).
Below is the code that I used:
RadMessageBox.Show(this, "No Record Found", "Information", System.Windows.Forms.MessageBoxButtons.OK, new System.Drawing.Bitmap(Properties.Resources.info), System.Windows.Forms.MessageBoxDefaultButton.Button1);
Please advice on how can I rectify this issue.
Thank you.
Hi,
I can't give you an exact time frame when the issue will be addressed. Please make sure that you cast your vote for the item. The more votes an item gathers, the higher its priority becomes.
If you click the Follow button, you will get notified once the item's status changes.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Hi Dess,
Thanks for the workaround, I hope this is just a temporary solution.
You guys will fix this issue in the coming release?
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 manage the location of the message box as follows:
public partial class ChildForm : Telerik.WinControls.UI.RadForm
{
public ChildForm()
{
InitializeComponent();
}
private void radButton1_Click(object sender, EventArgs e)
{
RadMessageBox.Instance.LocationChanged -= Instance_LocationChanged;
RadMessageBox.Instance.LocationChanged += Instance_LocationChanged;
RadMessageBox.Instance.FormClosing -= Instance_FormClosing;
RadMessageBox.Instance.FormClosing += Instance_FormClosing;
RadMessageBox.Show(this, "Child Form message", "Information", System.Windows.Forms.MessageBoxButtons.OK,
new System.Drawing.Bitmap(Properties.Resources.info), System.Windows.Forms.MessageBoxDefaultButton.Button1);
}
private void Instance_FormClosing(object sender, FormClosingEventArgs e)
{
RadMessageBox.Instance.LocationChanged -= Instance_LocationChanged;
}
private void Instance_LocationChanged(object sender, EventArgs e)
{
RadMessageBox.Instance.LocationChanged -= Instance_LocationChanged;
var box = sender as RadMessageBoxForm;
Point pt = new Point(this.MdiParent.Location.X + this.Location.X, this.MdiParent.Location.Y + this.Location.Y);
box.Location = new Point((pt.X + this.Width / 2) - (box.Width / 2), (pt.Y + this.Height / 2));
RadMessageBox.Instance.LocationChanged += Instance_LocationChanged;
}
}
The achieved result is illustrated in the attached WorkaroundBehavior.gif file. I have also attached my sample project for your reference.
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik