how to keep the strings displayed in the edit box and the selections in the pop-up menu in the GUI1 when you return back from GUI2.

1 view (last 30 days)
Hello, I have the following problem: I created two GUI (GUI1 and GUI2). In the first (GUI1) I have two edit text in which I insert numerical values of the two pop-up menus, and a callback function "forward" that brings me to the next GUI (GUI2) that contains two radio buttons, two list-box and two functions callback: a GUI allows you to go to the next (GUI3) the other to return to the previous GUI (GUI1). But when I select the pushbutton 'Back' to return to the gui1, edit the values in the text are not saved as well as the selections made in the pop-up menu. I wanted to know, kindly, how can I see what has been entered in the GUI1 and / or when I get back from the selected GUI2.
Thank you for your cooperation.
  1 Comment
Giuseppe on 19 May 2014
yes I saved the strings in the workspace. How do I set the value stored (for the first time) in the workspace in the function _OpeningFcn? I do not want that when the gui1 is started for the first time creates an error because it does not know the value saved in the workspace. If you start for the first time gui1 creates error?

Sign in to comment.

Accepted Answer

Yao Li
Yao Li on 19 May 2014
  1. Save the string to workspace or setappdata
  2. You can create a handle in the opening function of GUI1 to dectect whether GUI1 is launched for the first time or not.
  3. If GUI1 is not launched for the 1st time, Set the saved string to the edit text.

Sign in to comment.

More Answers (0)


Find more on Startup and Shutdown 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!

Translated by