GUI design - panel tab with overlapping panels
古いコメントを表示
I want to display a single panel when a tab is clicked, for this i used
set(handles.uipanel9,'Visible','Off')
set(handles.uipanel8,'Visible','On')
but when the buttons/tabs are clicked only the first uipanel is displayed and after that only that panel is displaying. If i click another button all the panels are not displayed(invisible). I found info saying that this happens because the panels are not parented to figure.
panel_handles1 = findobj(handles.figure1,'type','uipane9')
set( panel_handles1, 'parent', handles.figure1)
I used above code to fix it but it did not work. Any helpful ideas/links
Thanks
回答 (2 件)
Jay
2012 年 6 月 3 日
1 投票
Hello Milindu,
I have the same problem here. Thanks for making me notice that also my second panel gets a child of the first panel and hence is not displayed even though I set its Visible-Property to "on".
How can I change the parenting off the panel in guide though?
Walter Roberson
2012 年 6 月 3 日
Your line
panel_handles1 = findobj(handles.figure1,'type','uipane9')
needs to be changed to
panel_handles1 = findobj(0,'type','uipanel');
4 件のコメント
Jay
2012 年 6 月 4 日
and if you are designing your GUI in GUIDE you won't have such a line - how can the problem be solved in that case?
Arthur
2012 年 6 月 4 日
In GUIDE, if you use the mouse to move the 2nd panel over the first, a dark edge appears at the first panel. This indicates that the first panel becomes the parent. Instead, you can first create the 2nd panel next to the first, and then use the arrow keys (or 'align objects') to move it over the first. This way your figure window will remain parent of the 2nd panel.
Jay
2012 年 6 月 4 日
thanks Arthur, managed it with your help :)
Walter Roberson
2017 年 3 月 23 日
miro tane comments to Arthur:
thanks, helped a lot
カテゴリ
ヘルプ センター および File Exchange で Migrate GUIDE Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!