Controling Tabs in App Designer
26 views (last 30 days)
Show older comments
Aurélie B on 10 Apr 2021
Commented: Mario Malic on 11 Apr 2021
I am currently creating an app with AppDesigner and I am struggling with a problem I can't solve. Here is the situation : I created 2 different tabs in a panel, and depending on the tab I am currently on, I'd like to give a button differents actions to do.
My problem is : I don't know how to implemant the fact that I am in the tab1 or the tab2, and thus, the button doesn't work the way I want.
Thank you for helping!
Tabs are children of the TabGroup component. The latter component has property called SelectedTab which will be helpful.
By the way, you don't need to create a property nor the callback to use in your calculations, when app gets more and more complex, debugging can be problematic.
It is better to reference the components directly in the calculations.
if strcmpi(app.TabGroup.SelectedTab.Title, 'Segmentation')
% do this
% do that
More Answers (0)
Find more on Develop Apps Using App Designer in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!