Populating popup menu based on push button? (GUI)
显示 更早的评论
EDIT: This has been resolved with the follow-up from Walter Roberson.
Hello. I am having trouble adding values to a popup menu in a GUI. Here is my code:
function pushbutton1_Callback(hObject, eventdata, handles)
[code] % Code creates a nx1 vector of values from an Excel file and stores them in a variable called newz.
handles.z = newz % Adds newz to handles structure to be used later
function popupmenu1_Callback(hObject, eventdata, handles)
set(hObject,'String',{handles.z}), % Supposed to populate popup menu.
The popup menu is not supposed to be populated until the push button has been clicked.
How can I get my values in newz to be in the popup men?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Code Execution 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!