How can uicontrol be used to make an editable dropdown (eg combobox) control?

조회 수: 11 (최근 30일)
I'd like to use the uicontrol of matlab and its arguments rather than the uidropdown. But I want the uidropdown functionality of having a popup menu of items that can be programmatically populated, but also the flexibility of allowing the user to define their own input value as well as the convenience of selecting from a list of values. Can this be done?

채택된 답변

Walter Roberson
Walter Roberson 2020년 1월 16일
Only if you use a uicontrol style 'edit' together with the uicontrol style listbox . The primary value would be held in the edit uicontrol; the callbacks for the listbox would set the content of the edit uicontrol String property.
  댓글 수: 2
Meg Noah
Meg Noah 2020년 1월 16일
ugh i washoping there was a way tp make the listbox ir the popup directly editable like a microsoft combobox
the uidropdown has restrictions about what the parents can be
thx for answer!
Walter Roberson
Walter Roberson 2020년 1월 16일
The Property Inspector provides an interface for editing the list box String property, but it is not exactly convenient.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Art
Art 2020년 1월 28일
Just ran across this link while searching the same thing... there appears to be an editable property. I havent tried it yet but it looks like what you want:
https://www.mathworks.com/help/matlab/ref/uidropdown.html
  댓글 수: 1
Art
Art 2020년 1월 28일
Sorry... skipped over the first part of your question : "...use the uicontrol of matlab and its arguments rather than the uidropdown". Nevermind!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by