This chapter describes the Flex components used to present data, accept input, and define the application's layout. Rather than duplicating the Flex documents of the components, with their properties, methods, events, and styles, this chapter gives you some practical tips and ideas for using the components in your applications.
These controls present information and are not normally used for any input.
These controls display static text. Although both controls will display a string of characters, the
Label control can display only one line of text and will truncate the string if necessary, whereas the
Text control will word-wrap the string and automatically increase its height to accommodate the text.
Both controls use the same styles and methods. Figure 12-1 provides an example for each of these controls.
Figure 12-1. Figure 12-1
The following shows the code behind the controls:
<mx:Label text="Hello" /> <mx:Text text="World" />
selectable property for the
Text control is set to
true by default, which allows you to highlight the text displayed within the component; it is
Label. If you use
Label interchangeably, you may want to set the
selectable property to
Label control is not wide enough to contain all its text, the remainder is ...