필터 지우기
필터 지우기

GUI design - panel tab with overlapping panels

조회 수: 12 (최근 30일)
Milindu
Milindu 2012년 5월 28일
댓글: Walter Roberson 2017년 3월 23일
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
  댓글 수: 1
Milindu
Milindu 2012년 5월 29일
This has happen because when i create a panel on top of a panel it takes first panel as its parent (I don't know the reason why)... but when i make panels parenting to the figure1/gui...it works...Can see how panels arranges using Object Browser.

댓글을 달려면 로그인하십시오.

답변 (2개)

Jay
Jay 2012년 6월 3일
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
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
Jay 2012년 6월 4일
thanks Arthur, managed it with your help :)
Walter Roberson
Walter Roberson 2017년 3월 23일
miro tane comments to Arthur:
thanks, helped a lot

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by