
Insert and position the components 125
6. Select the Label control in the layout and set the following Label properties in the Flex
Properties view:
■ Te xt : Email
■ X: 20
■ Y: 60
7. Select the TextInput control in the layout, and set the following TextInput properties:
■ X: 90
■ Y: 60
■ Width: 300
8. Switch to the MXML editor’s Source mode by clicking the Source button in the document
toolbar.
The Layout.mxml file should contain the following MXML code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Label x="20" y="60" text="Email"/>
<mx:TextInput x="90" y="60" width="300"/>
</mx:Application>
9.
Insert the remaining Flex controls by entering the <mx:Label>, <mx:TextArea>, and
<mx:Button> tags after the <mx:TextInput> tag, as the following example shows:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Label x="20" y="60" text="Email"/>
<mx:TextInput x="90" y="60" width="300"/>
<mx:Label x="20" y="90" text="Comments"/>
<mx:TextArea x="90" y="90" width="300" />
<mx:Button x="330" y="150" label="Send"/>
</mx:Application>
Kommentare zu diesen Handbüchern