1
votes

for some reason my code is not having the desired effect of having labels to the left of the textinput fields*(like in nearly all normal scenarios with forms). The labels are appearing above the textinput fields. I would also like to make some of them read only. Any advice much appreciated

Basically what i have is text sitting above the textbox instead of alongside it to the left.

Here is my code:

<mx:VBox width="100%" height="100%">
 <mx:HBox>
 <mx:FormItem textAlign="left" <mx:Label text="TEST"  textAlign="left"                 fontSize="14" fontWeight="bold"/>    
 <mx:TextInput  enabled="true" textAlign="right"/> </mx:FormItem>

1

1 Answers

0
votes

Use the label field of the formitem.

<mx:FormItem textAlign="left" label="TEST" fontSize="14" fontWeight="bold"/>    
    <mx:TextInput  enabled="true" textAlign="right">
</mx:FormItem>

If you want read-only, then you can put editable="true|false" in the TextInput.