Filter löschen
Filter löschen

uidropdown : how know indices in item?

12 Ansichten (letzte 30 Tage)
Luca Re
Luca Re am 24 Jun. 2023
Beantwortet: dpb am 24 Jun. 2023
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"]);

Akzeptierte Antwort

dpb
dpb am 24 Jun. 2023
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.

Weitere Antworten (0)

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by