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 Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by