
Setting Tab Order
6-45
Setting Tab Order
A GUI’s tab order is the order in which components of the GUI are selected
when a user presses the
Tab key on the keyboard.
MATLAB figures maintain separate stacks that control tabbing for different
kinds of components:
• User interface controls such as buttons, sliders, and pop-up menus
• Panels, button groups (axes are in the same stack but cannot be tabbed)
• ActiveX controls (cannot be tabbed)
You can control the tab order of components only if those components are in the
same stack.
The tab order for each level is determined independently. The figure is the base
level, and each panel or button group establishes its own level. If, in tabbing
through the components at the figure level, a user tabs to a panel or button
group, then subsequent tabs sequence through the components of the panel or
button group before returning to the level from which the panel or button group
was reached.
When you create a GUI, GUIDE sets the tab order at each level to be the order
in which you add components to that level in the Layout Editor. This may not
be the best order for the user.
Note The tab order also affects the stacking order of components. If
components overlap, those that appear lower in the tabbing order, are drawn
on top of those that appear higher in the order. See “Front-to-Back
Positioning” on page 6-33 for more information.
The figure in the following GUI contains an axes, a slider, a panel, a static text,
and a pop-up menu. Of these, only the slider, the panel, and the pop-up menu
at the figure level can be tabbed. The panel contains three push buttons, which
can all be tabbed.
Kommentare zu diesen Handbüchern