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