Set handles of another GUI?
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
Is there a way to set handles of another GUI? I have a main GUI which prompt a sub GUI. In the sub GUI,when a button is pressed and it will set the main GUI visible off.
set(handles.fig1,'Visible','off');
I place this code on the the button of my sub GUI. fig1 is the handles of my main GUI. However to code has error because the sub GUI doesnt know the handles fig1.
0 件のコメント
採用された回答
Walter Roberson
2011 年 7 月 16 日
Set the Tag parameter for the main GUI's figure, and then in the sub-GUI
handles.fig1 = findobj(0,'Type','figure','Tag','TheTagYouSet');
7 件のコメント
Walter Roberson
2018 年 12 月 27 日
Try
close('all')
now run your program again and see what comes up.
If it still shows multiple items in hgui1 then try
hgui1 = unique(findobj('Tag','gui1'))
If that still returns multiple entries, please show the output of
struct2cell(get(hgui1))
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!