Multiplying panels using a spinner
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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!![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/772048/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/772048/image.png)
2 Kommentare
Mario Malic
am 19 Okt. 2021
two panels on top of each other to be shown is not clear. Maybe Tab Group component is what you mean?
Antworten (1)
Mario Malic
am 20 Okt. 2021
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
0 Kommentare
Siehe auch
Kategorien
Mehr zu Create Custom UI Components finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!