On macOS only the Caution icon is displayed. Multiple paragraphs can be passed in the message parameter by separating each paragraph with the EndOfLine function.Ĭlosing a MessageBox gives the focus back to the window, which calls its Activated event. On Macintosh, the Message box has a fixed width and the text word-wraps to fit the width of the MessageBox. On Windows and Linux, the width increases to accommodate the longest paragraph. The dialog can be closed either by clicking OK or clicking the Close widget. On Windows, the dialog also has a Close widget in its Title bar. The Message box opened by MessageBox has a Title bar. It enables you to add up to three buttons, label them in any way, and take any action after the user clicked a button. For other situations, the MessageDialog class is more appropriate. The MessageBox method is recommended for simple informational messages only.
Instead use the Debugger, System.DebugLog or your own logging mechanism.Ī message can be presented to the user with either the MessageBox method or the MessageDialog class.
The displaying of the Message Box will alter event order and may give unexpected results. You should avoid using MessageBox for displaying debugging messages. Reporting bugs and making feature requests.