FUNCTION REFERENCE

listdlg

Select from a list in a dialog.

Select from a list in a dialog.

Syntax

[indx, tf] = listdlg('ListString', list, ...)

Options: 'ListString' (required cellstr, string array, or char array), 'SelectionMode' ('multiple' or 'single'), 'InitialValue' (1-based indices, default 1), 'PromptString', 'Name', 'OKString', 'CancelString', 'ListSize' ([width height]). Returns chosen indices indx and tf=1 on OK, or [] and tf=0 on Cancel. Needs the desktop app.

Example

[indx, tf] = listdlg('ListString', {'Red', 'Green', 'Blue'}, 'SelectionMode', 'single');

Differences from MATLAB: Legacy spacing options (uh, fus, ffs) are not supported.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.