Ah, thanx. that clearifies a lot. But i don't understand why. I thought the IGraphicElements would be a util class to draw complex shapes into the owners graphic property. Which also means to me that the constraints should applied to be bounds of the component...
What am i missing? Best regards! --- In flexcoders@yahoogroups.com, "Ariel J" <arielj...@...> wrote: > > You can. It's just that the constraint based sizing of the inner rect doesn't > work when you use a vertical layout. Change them to height and width values > of 100% and you'll see. > > --- In flexcoders@yahoogroups.com, "Florian" <florian.salihovic@> wrote: > > > > > > Why is it not possible to draw an IGraphicElement into a Group which has > > a LayoutBase instance applied to it? > > > > <?xml version="1.0" encoding="utf-8"?> > > > > <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" > > > > xmlns:s="library://ns.adobe.com/flex/spark" > > > > xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" > > minHeight="768"> > > > > > > > > > > <fx:Script> > > > > <![CDATA[ > > > > import mx.graphics.SolidColor; > > > > > > > > import spark.layouts.VerticalLayout; > > > > > > > > > > protected function button1_clickHandler(event:MouseEvent):void > > > > { > > > > base.layout = new VerticalLayout(); > > > > } > > > > ]]> > > > > </fx:Script> > > > > > > > > > > <fx:Declarations> > > > > <!-- Place non-visual elements (e.g., services, value objects) here --> > > > > </fx:Declarations> > > > > > > > > > > <s:controlBarContent> > > > > <s:Button click="button1_clickHandler(event)" /> > > > > </s:controlBarContent> > > > > > > > > > > <s:Group id="base" bottom="100" left="100" right="100" top="100"> > > > > <s:Rect bottom="0" fill="{new SolidColor(0, .5)}" left="0" right="0" > > top="0" /> > > > > </s:Group> > > > > </s:Application> > > >