uidropdown : how know indices in item?

12 次查看(过去 30 天)
example: i select a ====> position =1
i select d=====> position =4
fig = uifigure;
%dd = uidropdown(fig,"Items",Period);
dd = uidropdown(fig,"Items",["a","b","c","d"]);

采纳的回答

dpb
dpb 2023-6-24
The index to the selected item is in the <InteractionInformation object> of the dropdown component. The object is available to the ClickedFcn callback function; if it is present the user clicked on a selection. There's example code at the above link.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interactive Control and Callbacks 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by