Values between GUI

Hi All,
I open a sub GUI from the MAIN GUI through selecting a menu and enter values in the edit text box I am trying to get the sub GUI text box value in the main GUI without opening the SUB GUI, but i couldn't do it.
As well the values entered in the SUB GUI vanishes once i close the SUB GUI.I also created a button and tried to get the string of the text box and set it to the same in the button callback. but if i close the SUB GUI and open it the values are gone
Can anyone help me with that?
Thanks in advance.
Regards, Bala

回答(1 个)

Image Analyst
Image Analyst 2011-11-10

0 个投票

You can't get values from a sub GUI without opening it. How could that ever work???
You can pass in values into the input argument list of a GUI, and accept output arguments from it back in your main program once your subGUI exits. Or, worst case, just write things out to a mat file using save() with a known filename that your main GUI knows the name of. You can set output arguments in the gui_OutputFcn() function. Here's a good GUI tutorial/example to help you get started: http://www.mathworks.com/matlabcentral/fileexchange/24224

此问题已关闭。

产品

提问:

2011-11-10

关闭:

2021-8-20

Community Treasure Hunt

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

Start Hunting!

Translated by