MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Podręcznik Użytkownika Strona 358

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 759
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 357
9 Managing and Sh aring Application Data in GUIDE
set(hObject, 'Position', [newX, newY, newW, newH]) ;
.
.
.
Initializing Text in the Text Change Dialog Box
1 To initialize the Tex t C hange dialog box text to the Change Me button’s
current text, get the main GUI’s
handles structure from its handle, passed
to the modal dialog box:
function change me_d ialog_OpeningFcn(hObjec t, ...
eventdata, ha ndle s, varargin)
mainGuiInput = find(strcmp(varargin, 'changeme_main'));
.
.
.
handles.changeMeMain = varargin {mainGuiInput+1};
2 Get the Change Me button’s String property and set the String property
of the edit box to that value in the dialog box
OpeningFcn.
% Obtain handles using GUIDAT A with the caller's handle
mainHandles = guidata(handles.chan geMeMain);
% Set the e dit text to the String of the main GUI's button
set(handles.editChangeMe, 'String', ...
get(mainHandles.buttonChangeMe, 'String'));
.
.
.
Canceling the Text Change Dialog Box
Call uiresume to close the modal dialog box if the user clicks Cancel or closes
the window. Do not modify the m ain GUI to close the modal dialog box.
function button Canc el_Callback(hObject, ...
eventdata, ha ndle s)
9-28
Przeglądanie stron 357
1 2 ... 353 354 355 356 357 358 359 360 361 362 363 ... 758 759

Komentarze do niniejszej Instrukcji

Brak uwag