Using a Panel to simply draw a rounded rectangle seems awfully wasteful.

- Gordon


-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Manish 
Jethani
Sent: Wednesday, August 10, 2005 2:29 PM
To: [email protected]
Subject: Re: [flexcoders] Re: How to render a foreground color on an <mx:Image>

On 8/11/05, Donal Carroll <[EMAIL PROTECTED]> wrote:

> I'm also listing the Laszlo code snippet so you'll see what I'm talking
> about: 
>   
> <canvas>
> <view name="TestView"> 
>     <simplelayout axis="y" spacing="3"/> 
>     
>     <view name="chip_fill"
> resource="common/browse/color_chip_fill.swf"
> fgcolor="red"/>
>     <view name="chip_fill"
> resource="common/browse/color_chip_fill.swf"
> fgcolor="green"/>
>     <view name="chip_fill"
> resource="common/browse/color_chip_fill.swf"
> fgcolor="yellow"/> 
>     
> </view> 
> </canvas>    

OK, I wonder why you need to load an external SWF to do this.  Anyway,
here's the Flex equivalent:

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml";
  xmlns="*" backgroundColor="white" horizontalAlign="left">
  <mx:Style>
    LaszloStyleView {
      header-height: 0;
      panel-border-style: roundCorners;
      corner-radius: 8;
      drop-shadow: false;
    }
  </mx:Style>
  <mx:Panel width="100" height="100"
    styleName="LaszloStyleView" backgroundColor="red" />
  <mx:Panel width="100" height="100"
    styleName="LaszloStyleView" backgroundColor="green" />
  <mx:Panel width="100" height="100"
    styleName="LaszloStyleView" backgroundColor="yellow" />
</mx:Application>

You style a Panel so that it shows round corners.  No need to load external SWF.

Manish



--
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



 




------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hl2ss43/M=362329.6886308.7839368.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1124260116/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~-> 

--
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/
 


Reply via email to