1 2 3 4 5 6 7 8 9 10 11 12
| function pushbutton4_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
closeGUI = handles.figure1; %handles.figure1 is the GUI figure
guiPosition = get(handles.figure1,'Position'); %get the position of the GUI
guiName = get(handles.figure1,'Name'); %get the name of the GUI
eval(guiName) %call the GUI again
close(closeGUI); %close the old GUI
set(gcf,'Position',guiPosition); %set the position for the new GUI |
Partager