Professional Documents
Culture Documents
Ma T 3
Ma T 3
– When the list box Callback is triggered, the list box Value property contains the index
of the selected item, where 1 corresponds to the first item in the list. The String
property contains the list as a cell array of strings.
– This example retrieves the selected string. It assumes listbox1 is the value of the Tag
property. Note that it is necessary to convert the value returned from the String
property from a cell array to a string.
index_selected = get(hObject,'Value');