getSelectedItems
Get the values of selected items from a tree hierarchy
Syntax
selectedItems = treeControl.getSelectedItems()
Description
fetches the information of the selected items in the tree.selectedItems = treeControl.getSelectedItems()
Output Arguments
Examples
% Get block mask handle maskObj = Simulink.Mask.get(gcb); % Get tree handle treeControl = maskObj.getDialogControl('TreeControl'); treeControl.getSelectedItems();
ans =
4×1 cell array
{'Node1/ChildNode1'}
{'Node1/ChildNode2'}
{'Node2/ChildNode1'}
{'Node2/ChildNode2'}
Version History
Introduced in R2019b