MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Instrukcja Użytkownika Strona 273

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 330
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 272
Using a Modal Dialog to Confirm an Operation
10-49
Setting Up the GUI with the Close Button
To set up the second GUI with a Close button, do the following:
1 Select New from the File menu in the GUIDE Layout Editor.
2 In the GUIDE Quick Start dialog, select Blank GUI (Default) and click OK.
This opens the blank GUI in a new Layout Editor window.
3 Drag a push button from the Component palette of the Layout Editor into
the layout area.
4 Right-click the push button and select Property Inspector from the pop-up
menu.
5 Change the String property to Close.
6 Change the Tag property to close_pushbutton.
7 Click the M-file editor icon on the toolbar of the Layout Editor.
8 Click the callback icon on the toolbar of the M-file editor and select
close_pushbutton_Callback from the menu.
The following generated code for the close button callback should appear in
the M-file editor:
% --- Executes on button press in close_pushbutton.
function close_pushbutton_Callback(hObject, eventdata, handles)
% hObject handle to close_pushbutton (see GCBO)
Przeglądanie stron 272
1 2 ... 268 269 270 271 272 273 274 275 276 277 278 ... 329 330

Komentarze do niniejszej Instrukcji

Brak uwag