Thanks Gordon, I'll try that. --- In [email protected], "Gordon Smith" <[EMAIL PROTECTED]> wrote: > > Sorry, I see that you said Flex 1.5. You would override draw() instead in your custom component, and the drawing methods like beginFill() and drawRect() are on the Label itself rather than on the Label's Graphics object. It should look something like this > > LabelWithBackground.mxml: > > <mx:Label> > > <mx:Script> > public function draw():Void > { > super.draw(); > > clear(); > beginFill(0xFFFF00); > drawRect(0, 0, width, height); > endFill(); > } > </mx:Script> > > </mx:Label> > > although I've probably messed something up because I've been working with Flex 2 for the last 18 months and have forgotten most of what I knew about Flex 1.5. > > - Gordon > > ________________________________________ > From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Gordon Smith > Sent: Thursday, June 22, 2006 11:33 PM > To: [email protected] > Subject: RE: [flexcoders] Flex 1.5 Label class, need background > > The background of the standard Label is always transparent, but it is easy to override this behavior by overriding the updateDisplayList() method. Do you know how to do programmatic drawing with the Graphics class? > > - Gordon > > ________________________________________ > From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of leo4beer > Sent: Thursday, June 22, 2006 3:24 AM > To: [email protected] > Subject: [flexcoders] Flex 1.5 Label class, need background > > Is it possible to set a background for a Label class? Is there an > alternative to these classes? It seems like the Labels I'm using have > a transparent background. > > thanks. > > Label class: > http://livedocs.macromedia.com/flex/15/asdocs_en/mx/controls/Label.html >
------------------------ Yahoo! Groups Sponsor --------------------~--> See what's inside the new Yahoo! Groups email. http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

