Customize size of UI.messagebox


Is it possible to customize the size of UI.messagebox?

I need to display some text with long sentences and I would like them to appear in separated lines in the messagebox, as seen in the example


It would be great if I could enlarge the width of the messagebox somehow, is that possible?


It’s not possible to resize it, but you can format your text strings to help…
Include \t to tab and \n for a new-line.
At least that way you can choose where to break the long lines of text.

You can make your own HTML dialog if you really need the sizing to vary…

You wouldn’t want the dialog to match the length of the sentence and exceed the width of the display.

The UI.messagebox is a very simple method that you can call, with content but not modify a lot. To configure more, you would better get hold of an object reference.

When you create a HtmlDialog, you have such an object where you can configure properties before calling it to be shown.
See here for a minimal messagebox-like example.

1 Like

Thanks for your answers,
I will try to use a HTMLDialog then