There might not always be enough space onscreen for everything you want to display. In such situations, you can make your content selectable using tabs. Consider how user settings are presented in most desktop applications and operating systems. Complex arrays of preferences are arranged by category—and those categories are often organized by tabs. This is just one way to handle navigation in an application.
Flex comes with a standard set of components—called navigators—that help you control the flow of your application by arranging visible elements into different views. Instead of presenting their children in vertical or horizontal (or other) layouts, navigators provide the means to switch between their children, showing one child at a time while hiding the others.
This section explores some of the navigator controls available to you in Flex, particularly the
TabNavigator is one of the most common navigator controls, so we’ll discuss it first. The
TabNavigator takes any number of child containers and provides a tab for each. Like all navigator components, the
TabNavigator requires its children to be container objects. Containers, as you know, group other elements into a single entity; thus, they’re perfectly suited to handling thematic content.
You set a tab’s text by assigning a
label property to each container attached to the navigator control. Containers from the Halo (
mx:) namespace have ...