uidropdown : how know indices in item?
12 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1418668/image.png)
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"]);
0 Commenti
Risposta accettata
dpb
il 24 Giu 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.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Interactive Control and Callbacks in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!