필터 지우기
필터 지우기

If statement (in master GUI) to call slave GUI and then have the slave edit value in master and program continue in master.

조회 수: 1 (최근 30일)
Excuse the question heading but I don't know how else to describe it.
I have a master GUI. In the master GUI which has numerous editboxes, I intend to have an if statement.
The if statement will be invoked when the user inputs a value greater than 8.
If that condition is met, another GUI will popup (slave).
The slave will consist of 1 listbox and 2 pushbuttons.
The listbox will state: ' Are you sure it has been 8 hours'.
If the user presses the 'Yes' pushbutton, I want the Master program to continue with the current value inputted in the editbox and shut down the subGUI (AKA slave).
If the user presses the 'No' pushbutton, I want the editbox in the Master to delete the current value in the editbox (in master), shutdown the subGUI and continue in the master GUI.
How do I get a subGUI to delete a value in an editbox in another GUI (master), then continue with the master and close the subGUI?

채택된 답변

CS Researcher
CS Researcher 2016년 5월 1일
Why do you want a separate GUI for that? You can just use a questdlg for that. Try this:
val = questdlg('Are you sure it has been 8 hours?','Confirm','Yes','No','Yes');
switch val
case 'Yes'
% Perform the required operation
case 'No'
% Perform the corresponding operation
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by