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

  • 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 650
Share Data Among a GUI’s Callbacks
Slider Values. In this example, both the slider callback, slide r_c allback,
and the edit text callback,
edittext_callback, retrieve the GUI data
structure
slider which hold previous and current values of the slider. They
then save the v alue,
slider.val to s lide r.previous_val before retrieving
thenewvalueandassigningitto
slider.val. Before returning, each callback
saves the
slider structure to GUI data.
slider = guidata(fh); % Get GUI data.
slider.previous_val = slider.va l;
slider.val = str2double(get(hObject,'String'));
...
guidata(fh,slider) % Save GUI data before returni ng.
Both callbacks use the guidata function to retrieve and save the s lider
structure as GUI data.
13-23
Vue de la page 650
1 2 ... 646 647 648 649 650 651 652 653 654 655 656 ... 758 759

Commentaires sur ces manuels

Pas de commentaire