Main Content
getSelectedItems
Class: Simulink.dialog.ListboxControl
Namespace: Simulink.dialog
Get the values of selected items from a list box
Syntax
getItems = listboxControl.getSelectedItems
Description
gets the information of the selected items from the list box.getItems
= listboxControl
.getSelectedItems
Output Arguments
Examples
% Get block mask handle maskObj = Simulink.Mask.get(gcb); % Get listbox handle listboxControl = maskObj.getDialogControl('Control2'); % Get selected items getItems = listboxControl.getSelectedItems;
getItems = 1×2 cell array {'Hello', 'World'}
Version History
Introduced in R2019a