

Since the value of the button parameter is the sum, you make a selection from each of the three tables, add up their values and pass that value. Third button of Group 1 list is the default. Second button of Group 1 list is the default. It refers to the ordering in the Group 1 table.įirst button of Group 1 list is the default. The terms first, second, and third in the following table do not necessarily refer to the physical positions of the buttons, which may vary among platforms. The third group of values pertains to the selection of the default button. The second group of values specifies the icon to be displayed. The value of Buttons is the sum of values that describe the number and labelling of the buttons, the icon, and the default button.There are three groups of button values each group offers choices for a particular feature.ĭisplay Abort, Retry, and Ignore buttons.

You get a fixed choice of button text and button positions. The MsgBox buttons are not localized - this is a known bug (feedback report 4665).īuttons is an optional parameter that enables you to customize the buttons and icon displayed in the message box to a limited extent. This is the result of changes made by Apple in HID specs. 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 MsgBox gives the focus back to the window, which calls its Activate event. On Macintosh, the Message box has a fixed width and the text word-wraps to fit the width of the MsgBox. 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 MsgBox has a Title bar. MsgBox is also ideally suited for porting VisualBasic programs to Xojo. 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 MsgBox function 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 MsgBox function or the MessageDialog class. The displaying of the Message Box will alter event order and may give unexpected results. You should avoid using MsgBox for displaying debugging messages.
