5 Replies Latest reply on Jun 22, 2009 10:52 AM by Handycam

    Change width of FC datalist in FB?

    Handycam Level 1

      I have a datalist component generated by FC, opened FXP in Flash Builder.


      I have 2 instances of it in the app.


      I'd like to make ONE instance wider. Which of the various component part control the width overall?


      And will it resize the PNG file it made for the background?

        • 1. Re: Change width of FC datalist in FB?
          ryanstewartadobe Adobe Employee

          By default (I think for everything) Flash Catalyst will set the height/wight of the list in the skinClass attribute where you use your <s:List> component. In that you'll see that the <s:DataGroup> has height and width specified.


          What you *should* be able to do is delete those and move those height/width values from the <s:DataGroup> tag to your <s:List> tag in the parent file.




          • 2. Re: Change width of FC datalist in FB?
            acath Level 4

            Sounds like you need a crash course in making your components resizable. This is a complex topic.


            I'd suggest Googling around for "flex constraints", "flex percent width", and "flex layout". You can also use the built-in SDK component skins as reference material. Look in


            {flex builder install home}/eclipse/plugins/com.adobe.flexide.flex/sdks/4.0.0/frameworks/projects/flex4/src/spa rk/skins/default/ListSkin.mxml


            In that skin, you can see that the skin author has used the top, left, right, and bottom properties to constrain parts of the skin to the edges of the skin. Then, when you have an instance of a component using that skin, you can set width and height on the instance and the various parts of the skin will resize appropriately.

            • 3. Re: Change width of FC datalist in FB?
              Handycam Level 1

              Well, they aren't MY components, they are FC-generated components. When I

              make my own components I have the option, but I wish there was a way within

              FC to specify (or not specify) absolute sizes/positions.  Sort of how you

              can do this in Apple's Interface Builder.

              For example, I created a nice repeating item in FC.  But if my list item has

              more or less text than the one I used as an example in FC, I am hosed.


              Also, since FC used absolute positioning for EVERYTHING, if I need to add or

              remove items once in FB, I have to keep track of and move many objects.


              So, being primarily a Flex developer, I have taken to removing all the code

              FC made and creating my own container elements, such as VGroup and HGroup,

              to allow for cleaner (as in easier to read) and easier-to-update MXML code.


              It would be nice, in FC, to have settable constraints on objects similar to

              the Appearance pane in Flex.  Also, the option to "group" items and treat

              said groups as a Spark Group, VGroup, or HGroup (and/or other containers).

              • 4. Re: Change width of FC datalist in FB?
                acath Level 4

                I agree completey. Unfortunately, the ability to make resizable UI is a very complex feature that we had to cut from the first version of Catalyst. As the developer, making UI resizable is a task that will continue to be in your domain for a while.


                In any case, did I answer your question about making these skins resizable?

                • 5. Re: Change width of FC datalist in FB?
                  Handycam Level 1

                  Yes, thanks.