How to resume the program runing after a button press ?
Show older comments
Hi !
I have a program script that opens a GUI. the user should press one of many buttons. and the value of a global variable will change depending on which button was pressed. then in the scribt that value will be used. the process will be repeated many times.
what happen now is after pressing the button I have to close the GUI for the rest of the program to run. so, I need a way to open the GUI once and for the rest of the program to run once one button is pressed.
the thing is I am so beginner in the whole GUI thing so I may need more detail or what exact function to use and where
thank you.
5 Comments
José-Luis
on 22 Aug 2017
I am not a GUI guy but something smells fishy here.
Globals? Why?
Why do you need to close the GUI for the program to run?
Nora Khaled
on 22 Aug 2017
José-Luis
on 22 Aug 2017
@Nora,
There certainly are better mechanisms than global variables to pass data between programs.
With regards to your question, your design is not entirely clear. Showing us the code would help clarify. It sounds like you have two pieces of code that you want to run in parallel, a script and a GUI. If that is the case, then that is not possible in matlab. You would indeed need to close the GUI to continue the script. To achieve something similar to what you want you'll need to move the script code within the GUI code.
Nora Khaled
on 22 Aug 2017
Answers (0)
Categories
Find more on App Building in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!