Also, have you considered grouped states yet? Or was that the complexity you wanted to avoid?
On Wed, Aug 9, 2017 at 3:33 PM, Philip Keiter <philip.kei...@gmail.com> wrote: > Hi Scott, have you tried controlling them this way? > b1.visible = b1.includeInLayout = false; > > That is the standard way to do it when states are not a good fit. > > Is there more complexity to it than your example demonstrates? > > -Philip > > On Wed, Aug 9, 2017 at 3:07 PM, Harbs <harbs.li...@gmail.com> wrote: > >> I usually just add them using code in this kind of case. Loop through >> your items and addElement() for each one. I find the declarative approach >> doesn’t work as well for this kind of thing... >> >> You can also use code to removeElement() for the ones you need to get rid >> of. >> >> I’ve used both approaches. >> >> HTH, >> Harbs >> >> > On Aug 9, 2017, at 8:37 PM, scott matheson <sc...@matheson.it> wrote: >> > >> > Hi >> > I have a data driven dynamic layout out, in this small example, when >> i show the page i could have 1 to 6 BrorderContainer, how can i exclude >> items form the layout and have the dynamically fill the remaining space, >> State would get overly complex >> > >> > IE >> > >> > b1.excludFromLayout = true; >> > >> > <s:VGroup gap="0"> >> > >> > <s:Label text="{activityType}" /> >> > >> > <s:BorderContainer width="{pageWidth.width}"> >> > <s:Label verticalAlign="bottom" left="10" text="{pageNumber}" >> fontSize="20" /> >> > <s:Label left="40" text="{sound}" /> >> > </s:BorderContainer> >> > >> > <s:HGroup gap="0" id="pageWidth"> >> > <s:BorderContainer id="b1" width="20" backgroundColor="green" >> cornerRadius="0" borderColor="black"/> >> > <s:BorderContainer id="b2" width="20" backgroundColor="yellow" >> cornerRadius="0" borderColor="black"/> >> > <s:BorderContainer id="b3" width="20" backgroundColor="gray" >> cornerRadius="0" borderColor="black"/> >> > <s:BorderContainer id="b4" width="20" backgroundColor="white" >> cornerRadius="0" borderColor="black"/> >> > <s:BorderContainer id="b5" width="20" backgroundColor="green" >> cornerRadius="0" borderColor="black"/> >> > <s:BorderContainer id="b6" width="20" backgroundColor="green" >> cornerRadius="0" borderColor="black"/> >> > >> > </s:HGroup> >> > >> > </s:VGroup> >> > >> >> >