I have one GUI (GUI1) with Button (Btn1). When I click the Btn1 a second window with plot (GUI2) appers and GUI1 becomes inactive (GUI2.fig and GUI.m are saved to disk). How to make both windows active?
I've tride something like this but it did not work:
InterfaceObj=findobj(fig,'Enable','on'); % fig = gcf;
set(InterfaceObj,'Enable','on');
GUI2 is invoked as follows:
h = GUI2;
Thanks for the answers!
My code: function visual_Callback(hObject, eventdata, handles) %Btn1 % hObject handle to visual (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
PDB_=getappdata(gcf,'PDB_');
file_=getappdata(gcf,'file_');
set(handles.PDB_list,'String', PDB_ );
SelectedItem = get(handles.PDB_list,'Value');
setappdata(gcf,'SelectedItem',SelectedItem);
fig = gcf;
h = GUI2; % GUI2.fig and .m file
visual(file_(SelectedItem,:)); %visual() is the function that generates my graph
InterfaceObj=findobj(fig,'Enable','on');
set(InterfaceObj,'Enable','on');
end