MATLAB Creating Graphical User Interfaces

(ff) #1
GUIDE displays the code file in the Editor, and moves the cursor to the pop-menu
callback, which contains this code:
% --- Executes on selection change in popupmenu1.
function popupmenu1_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

(^2) Add the following code to the popupmenu1_Callback after the comment that begins
% handles...
This code first retrieves two pop-up menu properties:



  • String — a cell array that contains the menu contents


Create a Simple App Using GUIDE
Free download pdf