Open GUI with GUi and passing data between them?
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
I would like to know how to open another GUI with the first GUI i create via button. Example, lets say i load image(im1) into first GUI. Then i press a button (edit) in first GUI, another GUI will pop out. At the second GUI i wana photo edit my image(im1).
I know i can do all there with first GUI but i want to learn how to open another GUI from GUI as my first GUI is already full of other stuff.
0 件のコメント
採用された回答
Image Analyst
2011 年 7 月 10 日
Just pass your image array to the second gui via the argument list when you call it, so in your button callback you'd have:
anyOutputArgs = gui2(yourImageArray);
See the FAQ if you don't know how to get your image array into the button's callback: http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.3F
Then in the OpenFcn of your second GUI, take the image array, which will be in varargin{1} and put it into a variable that can be used by the various functions in your second gui:
global imageArray;
imageArray = varargin{1};
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Migrate GUIDE Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!