1 Reply Latest reply on Jun 21, 2011 6:10 AM by -Hob

    Where to set creationPolicy and borderThickness for s:Group?

    Johnking08 Level 1

      I'm porting a Flex 3.1 application to Flex4.5.

       

      Here is the Flex 3.1 code:

       

      <mx:Canvas creationPolicy="auto" borderThickness="0" ...>

           <mx:HBox >

                <mx:Image .... />

           </mx:HBox >

      </mx:Canvas >

       

      This is the Flex 4.5 code I got so far:

       

      <s:Group ...>

          <s:layout >      

       

       

       

       

               <s:HorizontalLayout ..... />

          </s:layout >

          <mx:Image ...  />

      </s:Group>

       

       

      ~

      I could not find the place to set createPolicy and borderThickness with Flex 4's s:Group. Is Flex 3's mx:Canvas equivalen to s:Group in Flex4?

      I know s:Panel has the creationPolicy, but I do not want to use Panel. Any suggestions? Thanks.

        • 1. Re: Where to set creationPolicy and borderThickness for s:Group?
          -Hob Level 1

          Group's aren't skinnable.  I think the intent is that they're job is  simply to manage layout, so if you want a border, you wrap your group in  another component like BorderContainer.

           

          As for  creationPolicy, I'm guessing that you're Canvas was being used in one of  the mx Navigator classes (TabNavigator, Accordion, etc.).  You can wrap  your BorderContainer in a NavigatorContent component to manage creation  policy.

           

          <s:TabNavigator>

              <s:NavigatorContent>

                   <s:BorderContainer>

                       <s:Group>

                           ...

                       <s:Group>

                   </s:BorderContainer>

              <s:NavigatorContent>

          </s:TabNavigator>

           

          Message was edited by: -Hob