how to control the number of characters shown from a popupmenu

조회 수: 1 (최근 30일)
leydy Garcia
leydy Garcia 2020년 2월 21일
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

답변 (0개)

카테고리

Help CenterFile Exchange에서 App Building에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by