Here is an example of a custom component subclassing Label to give it a burgundy backgroundColor:

 

package {

 

    import mx.controls.Label;

    import flash.display.Graphics;

 

    public class MyLabel extends Label {

             

             override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void

             {

                                    super.updateDisplayList(unscaledWidth, unscaledHeight);

                                   

                                    var g:Graphics = graphics;

                                    g.clear();

                                    g.beginFill(0xCC0033);

                                    g.drawRect(0, 0, unscaledWidth, unscaledHeight);

                                    g.endFill();

            }

  }

}

 

Hope this helps.

Joan

 


From: [email protected] [mailto:[email protected]] On Behalf Of Daniel Freiman
Sent: Monday, September 11, 2006 7:15 AM
To: [email protected]
Subject: Re: [flexcoders] background color of a text?

 

My guess is that each control acts a little differently, but if it's not listed as a style or property in the docs for the control you want, then you can usually extend the class and set the background color of the UITextField that's actually rendering the text.

On 9/9/06, oktay nba <[EMAIL PROTECTED]com> wrote:

hi;

how can i give a background color to a text control (like the <span style='background-color=#xxxxxx'>anything</span> usage in html) or label?

 

oktay

 

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to