A label with a background color would be heavier than one without. Plenty
of people have added such functionality to subclasses. I think there are
some blog posts if you search around. Try FlexExamples first.
I find the answer myself.
Flex 3 doesn't like the label background to be changed.
But Flex 4/ Flash 4 Builder can. The official site of the controls.
doesn't show the property of it. However I find it my self.
I test it by using the css.
I did it.
Man Pak Hong, Dave
I think you have set the backgroundcolor for Label in Flex4...? In Flex3 doesn'y allow to set the background color directly...However you can use this work around if you want to set the background color.
You can also set the color for textField in the code below by using the textField styleSheet property.
<?xml version="1.0" encoding="utf-8"?>
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="applyBGtoLabel()">
private function applyBGtoLabel():void
var textField:TextField = new TextField();
textField = myLabel.mx_internal::getTextField();
textField.backgroundColor = 0xFF0000;
id="myLabel" text="Apply a background color for me....please" height="25" />