MATLAB: Do the popupmenus/ listbox disappear if i use pushbutton callback

callbackguipopupmenupushbutton

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 ?

Best Answer

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.