Azzera filtri
Azzera filtri

how to combine 2 gui ?

5 visualizzazioni (ultimi 30 giorni)
juhdi Ramdhoni
juhdi Ramdhoni il 18 Dic 2013
Risposto: David Sanchez il 18 Dic 2013
please help me.
I want to combine 2 gui. after the user success login then gui2 will be displayed.
% --- Executes on button press in login. function login_Callback(hObject, eventdata, handles) % hObject handle to login (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) ID = get(handles.edit1,'string'); PW = get(handles.edit2,'string'); if strcmp(ID,'admin') && strcmp(PW,'admin')==1 msgbox('login sukses'); aplikasi.fig; set(handles.figure,'Visibility',false); else errordlg('Invalid username or password'); end
gui2 (aplikasi.fig) does not show up when a successful login.

Risposta accettata

David Sanchez
David Sanchez il 18 Dic 2013
You should add this to your first GUI. Place it in the function that calls the second GUI.
% hide first GUI
set(gcf,'Visible','off');
% open second gui
gui2; % the name of your second gui m-file here

Più risposte (0)

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by