Method Query
Query(int, int, ustring, ustring, params ustring[])
Presents a normal MessageBox with the specified title and message and a list of buttons to show to the user.
public static int Query(int width, int height, ustring title, ustring message, params ustring[] buttons)
Parameters
widthintWidth for the window.
heightintHeight for the window.
titleustringTitle for the query.
messageustringMessage to display, might contain multiple lines.
buttonsustring[]Array of buttons to add.
Returns
- int
The index of the selected button, or -1 if the user pressed ESC to close the dialog.
Remarks
Use Query(ustring, ustring, params ustring[]) instead; it automatically sizes the MessageBox based on the contents.
Query(ustring, ustring, params ustring[])
Presents an error MessageBox with the specified title and message and a list of buttons to show to the user.
public static int Query(ustring title, ustring message, params ustring[] buttons)
Parameters
titleustringTitle for the query.
messageustringMessage to display, might contain multiple lines.
buttonsustring[]Array of buttons to add.
Returns
- int
The index of the selected button, or -1 if the user pressed ESC to close the dialog.
Remarks
The message box will be vertically and horizontally centered in the container and the size will be automatically determined from the size of the message and buttons.
Query(int, int, ustring, ustring, int, params ustring[])
Presents a normal MessageBox with the specified title and message and a list of buttons to show to the user.
public static int Query(int width, int height, ustring title, ustring message, int defaultButton = 0, params ustring[] buttons)
Parameters
widthintWidth for the window.
heightintHeight for the window.
titleustringTitle for the query.
messageustringMessage to display, might contain multiple lines.
defaultButtonintIndex of the default button.
buttonsustring[]Array of buttons to add.
Returns
- int
The index of the selected button, or -1 if the user pressed ESC to close the dialog.
Remarks
Use Query(ustring, ustring, params ustring[]) instead; it automatically sizes the MessageBox based on the contents.
Query(ustring, ustring, int, params ustring[])
Presents an error MessageBox with the specified title and message and a list of buttons to show to the user.
public static int Query(ustring title, ustring message, int defaultButton = 0, params ustring[] buttons)
Parameters
titleustringTitle for the query.
messageustringMessage to display, might contain multiple lines.
defaultButtonintIndex of the default button.
buttonsustring[]Array of buttons to add.
Returns
- int
The index of the selected button, or -1 if the user pressed ESC to close the dialog.
Remarks
The message box will be vertically and horizontally centered in the container and the size will be automatically determined from the size of the message and buttons.
Query(int, int, ustring, ustring, int, Border, params ustring[])
Presents a normal MessageBox with the specified title and message and a list of buttons to show to the user.
public static int Query(int width, int height, ustring title, ustring message, int defaultButton = 0, Border border = null, params ustring[] buttons)
Parameters
widthintWidth for the window.
heightintHeight for the window.
titleustringTitle for the query.
messageustringMessage to display, might contain multiple lines.
defaultButtonintIndex of the default button.
borderBorderThe border settings.
buttonsustring[]Array of buttons to add.
Returns
- int
The index of the selected button, or -1 if the user pressed ESC to close the dialog.
Remarks
Use Query(ustring, ustring, params ustring[]) instead; it automatically sizes the MessageBox based on the contents.
Query(ustring, ustring, int, Border, params ustring[])
Presents an error MessageBox with the specified title and message and a list of buttons to show to the user.
public static int Query(ustring title, ustring message, int defaultButton = 0, Border border = null, params ustring[] buttons)
Parameters
titleustringTitle for the query.
messageustringMessage to display, might contain multiple lines.
defaultButtonintIndex of the default button.
borderBorderThe border settings.
buttonsustring[]Array of buttons to add.
Returns
- int
The index of the selected button, or -1 if the user pressed ESC to close the dialog.
Remarks
The message box will be vertically and horizontally centered in the container and the size will be automatically determined from the size of the message and buttons.