MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guide de l'utilisateur Page 355

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 759
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 354
Making Multiple GUIs Work Together
changeme_dialog('changeme_main', handles.figure);
ThedialogboxusesthehandletoaccessthemainGUIsdata. Ifthemain
GUI’s data is missing, the dialog box displays an error in the Command
Window that describes proper usage and then exits.
Managing the Text Change Dialog
1 In the P roperty Inspector for the Text Change dialog box’s figure, set the
WindowStyle property to 'Modal'. This ensures that when the dialog box
is active the user cannot interact with other figures.
2 Call uiwait in the OpeningFcn of the dialog box to put off calling the output
function until
uiresume is called. This keeps the invocation call of the
GUI from returning until that time:
function changeme_dialog_ OpeningFcn(hObject,eventdata,handles,varargin)
.
.
.
uiwait(hObject);
.
.
.
3 Invoke uiresume within CloseRequestFcn for the figure, the Cancel
button, and the OK button. Every callback in which the GUI needs to
close should call
uiresume:
function button Canc el_Callback(hObject,eve ntdata,handles)
uiresume(handles.figure);
function fig ure_ CloseRequestFcn(hObject ,eventdata,handles)
uiresume(hObject);
function but tonO K_Callback(hObject,even tdata,handles)
9-25
Vue de la page 354
1 2 ... 350 351 352 353 354 355 356 357 358 359 360 ... 758 759

Commentaires sur ces manuels

Pas de commentaire