IupListDialog
Shows a modal dialog to select options from a simple or multiple list.
Creation and Show
int IupListDialog(int type, const char *title, int size, const char *list[], int option, int max_col, int max_lin, int mark[]); [in C] iup.ListDialog(type: number, title: string, size: number, list: table of strings, option: number, max_col: number, max_lin: number, mark: table of numbers) -> see comments [in Lua]
type:
=1 simple selection; =2 multiple selection
title:
Text for the dialog’s title
size:
Number of options
list:
List of options
option:
Initial option, starting at 1 (note
that this index is different from the return value, kept for compability reasons)
max_col:
Maximum number of columns in the list
max_lin:
Maximum number of lines in the list
mark:
Flag vector, used only when type=2
When type=1, the function returns the number of the selected option (the first option is 0), or -1 if the user cancels the operation.
When type=2, the function returns -1 when the user cancels the operation. If the user does not cancel the operationthe function returns a non zero value and the mark parameter will have value 1 for the options selected by the user and value 0 for non-selected options.
Notes
In IupLua, the return value depends on used option. In case type is 1 (simple selection), the return value is a 0-based number of the selected option. If the type is 2 (multiple selection), the return type is a table with the marked options.
The dialog uses a global attribute called "PARENTDIALOG" as the parent dialog if it is defined. It also uses a global attribute called "ICON" as the dialog icon if it is defined.