GUIDE-generated GUI
When using GUIDE, you can simply use the "Tab Order Editor". Get to it using the following menu item:
For this simple GUI, with a single button and two text boxes, you would see the following dialog box:
Then set the tab order by moving UI objects up/down.
Programmatic GUI
To set the tab order programatically, you can use uistack
to reorder the handles.
For example, to move a uicontrol
"up" one in the order:
uistack(hui,'up',1)
To see the order of the handles to all controls in figure hf
:
ch = get(hf,'Children')