Why do the popupmenus/ listbox disappear if i use pushbutton callback ?

2 次查看(过去 30 天)
I have GUI, which has few pushbuttons that loads some data into popupmenus and listbox When I click on pushbutton, to reset the content to empty, it makes the popupmenu /listbox disappear. why does it happen? how can I avoid it ?
  2 个评论
Walter Roberson
Walter Roberson 2018-7-22
Please do not close questions that have an answer.
Your question is not unclear: you are just asking to do something that cannot be done in MATLAB.
Image Analyst
Image Analyst 2018-7-22
If you're got your answer, and are all done, then you can "Accept" the answer (to give the answerer reputation points and let everyone know it's solved) rather than Close the question.

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2018-7-22
When you set the String property of the popup or listbox to empty, you need to set the Value property to [] at the same time, or else the Value will be greater than the number of strings and it will consider that an error and refuse to draw the box.
  2 个评论
VBBV
VBBV 2018-7-22
编辑:VBBV 2018-7-22
when I do that I get a warning message Warning: 'popupmenu' control requires a scalar Value. Control will not be rendered until all of its parameter values are valid Still the popupmenus disappear.
Walter Roberson
Walter Roberson 2018-7-22
Basically, you cannot have an empty popup. You can have an empty listbox though.

请先登录,再进行评论。

更多回答(0 个)

类别

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