mrdialog_select.pro
mrDialogSelect
Syntax:
button = mrdialog_select( message, buttons, title=title, group_leader=gl,
. default=int, cancel=int,
. bsize=bsize, /question, /warning, /error, /info )
Return value:
In case of argument errors the function returns -1
Arguments:
message
String or array of strings for messages with more than one line.
buttons
String or array of strings containing the button texts
title
Sets the window title
group_leader
This is a modal widget, so the group leader must be set
default_button
Index of the default button, starting with '0'
cancel_button
Index of the cancel button
bsize
Sizes of the single buttons in pixels. bsize can either be a single integer
in which case all buttons will be of the same size, or an array with the
the number of elements corresponding to the number of buttons.
question
Display the question bitmap
warning
Display the warning bitmap (default)
error
Display the error bitmap
info
Display the info bitmap
Description:
A kind of dialog_message box, but with an arbitrary number of buttons.
The return value is the index of the selected button, starting from
'0' for the left most one. I find this more appropriate than returning
the button value, esp. when it comes to internationalization.
Example code:
button_number = mrdialog_select(['A message in','2 lines'], ['button1','button2'], /info )