Filter löschen
Filter löschen

Transfer of information between GUIs

2 Ansichten (letzte 30 Tage)
Clément P
Clément P am 1 Apr. 2016
Beantwortet: Clément P am 1 Apr. 2016
Hi everyone,
I'm working on a program which have 2 GUIs. My GUI_A is my main GUI and GUI_B is the sub GUI.
I have a PushButton in my GUI_B and I want to know in my GUI_A when this pushbutton has been activate. Do you know a way to do it?
My code in GUI_A :
handles.GUI_B=GUI_B; %Open GUI_B
handles.GUI_B=guidata(findall(0,'Tag','GUI_B)); %retrieve handles from GUI_B
while get(handles.GUI_B.PushButton,'Value')~=1
handles.GUI_B=guidata(findall(0,'Tag','GUI_B)); %Update Handles from GUI_B
end
close(handles.GUI_B.h);
The problem with this code is that it does an infinite loop... I would like to know if there is a way to send an information from GUI_B to GUI_A. Like (Code in GUI_B) :
function PushButton_Callback (hObject,~)
if get(hObject,'Value')
%Do stuff
send(hObject,'Value') to GUI_A
end
Or even a way to unpause GUI_A from GUI_B.
Anyway, I'm open to all proposals !!
Thanks all, Clément.

Akzeptierte Antwort

Clément P
Clément P am 1 Apr. 2016
Actually it works with waitfor(handles.GUI_B). ;)

Weitere Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by