how to control the number of characters shown from a popupmenu

1 view (last 30 days)
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

Answers (0)

Categories

Find more on App Building in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!