From: Kyle Coogan on
I'm attempting to alter the tab order in my MATLAB GUI. I understand there is a tab order tool in GUIDE, however it doesn't see panels for whatever reason. Therefore, I'm attempting to use uistack to change the order (see below). The code I implemented definitely changed the order, but not entirely in the way I anticipated.

uistack(handles.Button5, 'bottom')
uistack(handles.Button4, 'bottom')
uistack(handles.Button3, 'bottom')
uistack(handles.Button2, 'bottom')
uistack(handles.Button1, 'bottom')

%Only one of these is visible at a time
uistack(handles.Panel6e, 'bottom')
uistack(handles.Panel6d, 'bottom')
uistack(handles.Panel6c, 'bottom')
uistack(handles.Panel6b, 'bottom')
uistack(handles.Panel6a, 'bottom')

uistack(handles.Panel5, 'bottom')
uistack(handles.Panel4, 'bottom')
uistack(handles.Panel3, 'bottom')
%Buttongroup2 control whether panel2 is visible, or panel2a and 2b are visible
uistack(handles.Panel2, 'bottom')
uistack(handles.Panel2b, 'bottom')
uistack(handles.Panel2a, 'bottom')
uistack(handles.Panel1, 'bottom')
uistack(handles.buttongroup2, 'bottom')

The order I'd like to tab through them is starting with buttongroup2, then to Panel1, etc. - upwards, ending with Button5, just like the uistack help file shows. Any help is appreciated.

Thanks,
Kyle

P.S. Sorry if there's some type of tag I should apply to the code to format it properly for the forum. I looked, but couldn't find anything.