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 中查找有关 Financial Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by