필터 지우기
필터 지우기

How to switch uitab using commands?

조회 수: 6 (최근 30일)
Albert Bing
Albert Bing 2022년 5월 11일
댓글: Albert Bing 2022년 5월 11일
I wrote a GUI program and needed to switch uitabs. Is it possible to switch to next uitab using command? Suppose I had 2 axeses, ax1 & ax2, axis(ax2) would switch to ax2, so how to switch uitab using commands?
If not possible, how to send a shortkey in MATLAB? If I can send a shortkey "ctrl+tab" using a command, it will do the uitab switching job.
P.S. the program uses figure, not uifigure.

채택된 답변

cr
cr 2022년 5월 11일
편집: cr 2022년 5월 11일
Use SelectedTab property of uitabgroup.
E.g.
f = figure;
tabgp = uitabgroup(f,'Position',[.05 .05 .3 .8]);
tabA = uitab(tabgp,'Title','Tab A');
tabB = uitab(tabgp,'Title','Tab B');
tabgp.SelectedTab = tabA; % Switch to tab A
tabgp.SelectedTab = tabB; % Switch to tab B
Regards
  댓글 수: 1
Albert Bing
Albert Bing 2022년 5월 11일
Ah, it's a property of uitabgroup, a litttle like the case in uibuttongroup.

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

추가 답변 (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