how to control the number of characters shown from a popupmenu

1 Ansicht (letzte 30 Tage)
leydy Garcia
leydy Garcia am 21 Feb. 2020
Hi,
I have a popupmenu1 control, where I have two choices: us/m and us/feet. I want to get the selected option by using the following code:
MDunit1=get(handles.popupmenu1,'String');
idx1=get(handles.popupmenu1,'Value');
selectedMDunit1 = MDunit1(idx1);
However, the selected unit 'selectedMDunit1' only shows the first character, so I do not know if that corresponds to first or second option since both starts with the same letter. I was wondering if there is a way to show at least 4 characters to differentiat the two of them. How can I do this?
Thanks

Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps 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