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

1 vue (au cours des 30 derniers jours)
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?

Réponse acceptée

CS Researcher
CS Researcher le 1 Mai 2016
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

Plus de réponses (0)

Catégories

En savoir plus sur Financial Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by