Main Content
setSelectedItems
Class: Simulink.dialog.ListboxControl
Namespace: Simulink.dialog
Set values for a list box
Syntax
setItems = listboxControl.setSelectedItems({string1','string2',...})
Description
sets the values for the selected items in the list box.setItems
= listboxControl
.setSelectedItems({string1','string2',...})
Input Arguments
Examples
% Get block mask handle maskObj = Simulink.Mask.get(gcb); % Get listbox handle listboxControl = maskObj.getDialogControl('Control2'); % Set selected items listboxControl.setSelectedItems({'Hello','World'});
Version History
Introduced in R2019a