Multiplying panels using a spinner

조회 수: 2 (최근 30일)
Georgiana Cristea
Georgiana Cristea 2021년 10월 19일
답변: Mario Malic 2021년 10월 20일
Hello!
I am currently trying to multiply the numbers of panels shown in App designer using a spinner. For example, if the spinner value is two, i want two panels on top of each other to be shown. I also want if possible to switch through them using a forward button and a backwards button.
I will post a picture of my app.
Thank you in advance for helping!
  댓글 수: 2
Mario Malic
Mario Malic 2021년 10월 19일
two panels on top of each other to be shown is not clear. Maybe Tab Group component is what you mean?
Georgiana Cristea
Georgiana Cristea 2021년 10월 20일
Yes, this would work too!

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

답변 (1개)

Mario Malic
Mario Malic 2021년 10월 20일
Hi,
You can do that using the Value property of the Spinner component and SelectedTab property of the GroupTab component.
SelectedTab accepts Tab object, and to get that you can use Children component of the TabGroup. Make sure your spinner is in range of children objects (number of tabs)
Example:
% Spinner callback
function SpinnerValueChangedFcn(source,event)
app.GroupTab.SelectedTab = app.GroupTab.Children(event.Value);
end

카테고리

Help CenterFile Exchange에서 Create Custom UI Components에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by