Totally agree with you. I hate having to create a VGroup inside a Group just so I can draw a Rectangle as the background of the Group and still layout all the other children vertically, for example.
--- In [email protected], "Florian" <florian.saliho...@...> wrote: > > Yes, in that case i would expect the Displayobject to effecting the layout > and the measuring. > > But that's not what we always want. Sometimes we just want to draw to the > graphics property of a component/container. It would be absurd to create a > GroupBase instance to "not layout" the instances like a VGroup and a Rect, > which should be the VGroups background. > > So, Performance is no issue with the Flash Player anymore? > > --- In [email protected], "Ariel J" <arieljake@> wrote: > > > > From the docs for IGraphicElement: > > > > "Group organizes its IGraphicElement children in sequences that share and > > draw to the same DisplayObject. The DisplayObject is created by the first > > element in the sequence." > > > > That means that there is a single DisplayObject added to the display list > > upon which the graphic primitives are drawn. I am sure this DisplayObject > > is subject to the behaviors of the layout of the Group, as in BasicLayout > > vs. VerticalLayout, just like any other child of the Group. > > > > --- In [email protected], "Florian" <florian.salihovic@> wrote: > > > > > > 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 [email protected], "Ariel J" <arieljake@> 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 [email protected], "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> > > > > > > > > > > > > > > >

