필터 지우기
필터 지우기

GUIDE hack to UITABS not quite working as expected

조회 수: 1 (최근 30일)
Jason
Jason 2019년 10월 7일
댓글: Jason 2019년 10월 7일
Hello, I have tried to follow the link below to "hack" a uitab group using guide. In short it uses panels that are assigned to a uitab group.
However, following the exact instructions yields:
im136.png
when I use the following, it seems to hide everything else on my main figure called GUI1.
handles.tgroup = uitabgroup('Parent', handles.GUI1,'TabLocation', 'top');
and when I change the line above to:
pos=get(handles.P1,'Position')
handles.tgroup = uitabgroup('Position', pos,'TabLocation', 'top');
I get the correct location as well as the rest of mycomponents on my main figure being visible now, but everything is squashed up on the panels.
im135.png
  댓글 수: 2
Adam
Adam 2019년 10월 7일
Looks like something where you would need to play around with the units and check the relative positions of components within a panel. It's not something I would ever want to do though, especially in your case where the tabs are just part of a UI rather than filling the whole UI as in the original example. I have always used programmatic GUIs and the GUI Layout toolbox for doing tabs in a UI.
It should be possible to keep the components of a panel in the same relative positions when you re-parent the panel though if you do it correctly.
Jason
Jason 2019년 10월 7일
thanks, I think its simpler to just overlap the panels and set their visibility to on or off via a checkbox

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

답변 (0개)

카테고리

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