I have a form that I would like to style. specifcally I would like to chnage the background color of the form item’s label. (the backgorundColor attribute changes both the label and the inputs background color)
i.e.
<mx:Form> <mx:FormItem label='username:'> <mx:TextInput /> </mx:FormItem> </mx:Form>
I would like to make the label with ‘username:’ have a different background color, but have the text input still be the default background color.
is this possible with a FormItem ?
A formitem has an object it uses to display the label called the FormItemLabel, this objects purpose is so you can style the label of a form item.
In flex 2 to change the style you can try:
However I looked over the flex 2 lang ref and it doesn’t seem like you can change the background color of the label. Click here for lang ref link
If you are using flex 3 the desired way to change the label of the FormItem is through the formitems labelStyleName
However once again I don’t believe they added the ability to change the background color of the label itself. Click here for lang ref link
Best choice of action if this is required would be to extend the formitem class, unless anyone else has any ideas.
Hope this helps…