Hi all,I have a UltraMessageBoxInfothat is displayed by an UltraMessageBoxManager.
If the text is long the header is cut of.
How can I resize the MessageBoxInfo? There is a MaximumWidth but changin this has no effect (at least not any visible effect).
thanks in advance and best regardsAndy
Hi Rene,
The width of the dialog will expand until it reaches the MaximumWidth, after that the header’s text will be cut off. You can split that text with ‘\n’, so the whole text to be displayed. Other option is to use the HeaderAppearance’s TextTrimming enumeration and set a proper for your scenario trimming of the text.
Let me know if this is helpful for you.
Regards,
Stefaniya
Hi Stefaniya,
that was what I initially expected to happen.I have set the MaximumWidth as shown below, but the box is always the same size... it doesn't change the size regardless what I enter for MaximumWidth (I also tried it using 25 and 2500 as values... all the same).
UltraMessageBoxInfo messageinfo = new UltraMessageBoxInfo { Style = MessageBoxStyle.Standard, Buttons = MessageBoxButtons.OK, Icon = MessageBoxIcon.Exclamation, DefaultButton = MessageBoxDefaultButton.Button1 }; messageinfo.ButtonAppearance.FontData.Bold = DefaultableBoolean.True; messageinfo.ButtonAreaAppearance.BackColor = Color.LightSteelBlue; messageinfo.Owner = this; messageinfo.Caption = String.Format(caption); messageinfo.Header = header; messageinfo.MaximumWidth = 1000; messageinfo.TextFormatted = body; messageinfo.FooterFormatted = footer; this.mbmMain.ShowMessageBox(messageinfo);
Please be so kind and advise,best regardsAndy
Set the minimum width in the MessageBoxManager if you want it to have a minimum size.
Thanks Erik for your hint, it actually works like a charm ;)Indeed setting a MinimumWidth results in a bigger box after all, quite obvious if I think about it ;)
Have a great weekend and best regardsAndy