Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2023.0.0 - English


Open a message box.


[btn] = messagebox(msg)
[btn] = messagebox(msg, msgboxtitle)
[btn] = messagebox(msg, msgboxtitle, msgboxicon)
[btn] = messagebox(msg, msgboxtitle, msgboxicon)
[btn] = messagebox(msg, msgboxtitle, msgboxicon, buttons)
[btn] = messagebox(msg, msgboxtitle, msgboxicon, buttons, ismodal)



Matrix of strings: the message box displays each entry of this matrix (one entry per line).


String: the title of the message box (default value is "Scilab Message").


String: the name of the icon to be displayed in the message box, its possible values are:

  • "error"

  • "hourglass"

  • "info"

  • "passwd"

  • "question"

  • "warning"

  • "scilab": default icon


1xn vector of strings: the names of the buttons to be displayed in the message box. By default, only one button is displayed with label "OK".


String: "modal" to create a modal dialog, any other string to create a non-modal dialog. Please note that "modal" can replace any of the other input arguments except msg (See examples).


Scalar: number of the button that the user pressed (1 is the leftmost button) for a modal dialog, 0 else.


Creates a dialog window to display a message waiting or not for a user action.


// Simple example
messagebox("Single line message")

// Multi line message with title
messagebox(["Multi-line" "message"], "User defined title")

// Icon specified by the user
messagebox("An error message", "Error", "error")

// Buttons labels + "modal" replaces title
messagebox("Have you seen this beautiful message", "modal", "info", ["Yes" "No"])

// "modal" given as fifth input argument
messagebox("An error message", "Error", "error", ["Continue" "Stop"], "modal")
Report an issue
<< loadGui GUI printfigure >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Mar 27 11:52:45 GMT 2023