Enable/Disable uitabs in uitabgroup, with v2015b
Ältere Kommentare anzeigen
In a GUI, is there a way to disable/enable a tab created by uitabgroup / uitab.
In a GUI I'm building, I would like to prevent the user from accessing some tabs at earlier stage of the process, and then grant access later when some operations are done in the GUI.
In following example:
fig=figure();
tabgroup=uitabgroup('Parent',fig);
tab1=uitab(tabgroup,'title','title1');
tab2=uitab(tabgroup,'title','title2');
I would like to disable tab2 (something like set(tab2,'Enable','off') would be nice).
It was possible with previous release (I tested with v2013a) using the following sequence:
jtabgroup=getappdata(handle(tabgroup),'JTabbedPane');
jtabgroup.setEnableAt(1,0);
... but I can't make it work using v2015b.
Thank you,
Antoine
1 Kommentar
Bin Makhashen
am 20 Nov. 2015
I got the same issue, please any expert help us!
Akzeptierte Antwort
Weitere Antworten (2)
David Young
am 20 Nov. 2015
0 Stimmen
A quick thought - how about using the SelectionChangedFcn callback of the uitabgroup object, to select another tab when one of the forbidden tabs is slected?
1 Kommentar
Antoine Luijkx
am 21 Nov. 2015
Sean de Wolski
am 6 Nov. 2020
0 Stimmen
In App designer this is possible by adding a panel inside the uitab and disabling the uipanel.
Kategorien
Mehr zu Environment and Settings finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!