How can I get another window after clicking on the push button?
Mostrar comentarios más antiguos
I am making a tictactoe game. At first a window will come asking for the players' name. Then when the push button written "play" on it is clicked the window will change i.e. the window containing the game's plot will come.
Respuesta aceptada
Más respuestas (1)
Ana Gonçalves
el 4 de Jun. de 2020
Editada: Ana Gonçalves
el 4 de Jun. de 2020
Hi guys, I did the following structure, and it works!
Use the command open to load a new GUI file (.fig) as in my example:
% --- Executes on button press in pushbutton5. Run Data analysis when pressing the button
function pushbutton5_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
strGui2 = ('C:\Users\Desktop\Matlab Ana\AnalysisTab.fig'); %Set your GUI file's location
open (strGui2); %Open the new GUI
closereq; %Close the actual GUI
1 comentario
Sumayyah Alhydary
el 6 de Abr. de 2021
Thank you that was very helpful!
Is there away to edit it so it doesn't reopen a new figure each time I click on the pushbutton?
because what I'm doing is to draw things on the figure and whenever I click again on the pushbutton a new empty figure shows up.
Thanks in advance!!!
Categorías
Más información sobre Strategy & Logic en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!