How can I program the selection options of the popupmenu?

조회 수: 2 (최근 30일)
Maik Abrams
Maik Abrams 2019년 4월 9일
댓글: Jan 2019년 4월 9일
I want to read a xls File in Matlab and give the User of my GUI the possibility, to choose an option depending on the data from my xls File. So the selction options of the popupmenu have to be changed. Is that possible and how can I do it?
Example:
List from xls-File:
  1. green
  2. blue
  3. red
this are then the options of my popupmenu.
But if the List contains
  1. green
  2. blue
  3. red
  4. yellow
yellow should be also an option of the popupmenu.
  댓글 수: 2
Adam
Adam 2019년 4월 9일
You cabn edit the 'string' property of a uicontrol (which is what I assume you are using as a popumenu) whenever you want.
Jan
Jan 2019년 4월 9일
@Adam: This is the perfect answer already. I hestitate to post "Simply set the 'String' property of the popup menu" as my answer.

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

답변 (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