MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Manuel d'utilisateur Page 42

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 330
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 41
2 Creating a GUI with GUIDE
2-22
index of the selected string. The pop-up menu callback reads the pop-up menu
Value property to determine what item is currently displayed and sets
handles.current_data accordingly.
1 Display the pop-up menu callback in the M-file editor. Right click the pop-up
menu component in the Layout Editor to display a context menu. From that
menu, select
View Callbacks -> Callback.
The GUI M-file opens in the editor if it is not already open, and the cursor
moves to the pop-menu callback which already 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
-
Value – the index into the menu contents of the selected data set.
Vue de la page 41
1 2 ... 37 38 39 40 41 42 43 44 45 46 47 ... 329 330

Commentaires sur ces manuels

Pas de commentaire