This class represents a dialog that shows a list of strings, and allows the user to select one. Double-clicking on a list item is equivalent to single-clicking and then pressing OK.
SingleChoiceDialog overview, MultiChoiceDialog
SingleChoiceDialog.new(Window parent, String message,
String caption,
Integer n,
String choices,
(arg-type) clientData = nil,
Integer style = CHOICEDLG_STYLE,
Point pos = DEFAULT_POSITION)
SingleChoiceDialog.new(Window parent, String message,
String caption,
ArrayString choices,
(arg-type) clientData = nil,
Integer style = CHOICEDLG_STYLE,
Point pos = DEFAULT_POSITION)
Constructor, taking an array of String choices and optional client data.
| OK | Show an OK button. |
| CANCEL | Show a Cancel button. |
| CENTRE | Centre the message. Not Windows. |
The default value is equivalent to DEFAULT_DIALOG_STYLE * RESIZE_BORDER * OK * CANCEL * CENTRE.
Use SingleChoiceDialog#show_modal to show the dialog.
Integer get_selection()
Returns the index of selected item.
char get_selection_client_data()
Returns the client data associated with the selection.
String get_string_selection()
Returns the selected string.
set_selection(Integer selection)
Sets the index of the initially selected item.
Integer show_modal()
Shows the dialog, returning either ID_OK or ID_CANCEL.
[This page automatically generated from the Textile source at Thu May 01 00:50:43 +0100 2008]