Ted Patrick > { Events & Community } > Adobe Systems


FlowContainer Component

Hats off to Eric Cancil for putting together a great new container control called FlowLayout extending Flex. The new container takes any children (UIComponents) and lays them out handling variable sizes and resizing behavior. What I find interesting is just how useful this component it from an application development perspective. Assuming you get data in via XML you can create component instances and render them into this control at runtime, dynamic forms, dynamic text with images can all be handled within this container.

I will be showing a demo of the new container at the Flex/AIR Pre-Release Tour at Ebay tonight.

Thanks Eric for extending Flex!

Cheers,

Ted :)

6 Responses to “ FlowContainer Component ”

  1. # Anonymous Tink

    I tried commenting on Eric's blog but just got an error when I submitted my comment, so I thought I'd post it here.

    "Not sure if its worth mentioning but i changed the packages in my copy to be consistent with Adobe's code.

    net.threeronrec.containers.FlowContainer.as
    net.threeronrec.containers.utilityClasses.FlowLayout.as

    I'm not saying one is more correct than the other, just that i like to see consistency in my code."  

  2. # Anonymous Shawn Spencer

    This isn't the first flow layout container implemented in Flex. "jamesjaco" posted a Flow layout component almost a year ago to the Flex Cookbook:

    Flow layout on Flex Cookbook

    It wasn't well written, and certainly wasn't the best way of doing things (it basically just extended Tile and didn't force the children to all be the same size), but it worked.

    A month and a half later, Darron Schall did it better, extending Container but using basically the same code to lay out the children. He committed his component to FlexLib.

    I liked Darron's FlowContainer, but missed the "direction" property. Apparently so did "jamesjaco" who wrote the component all over from scratch using a lot of Darron's ideas but with direction as well. He posted it to the Flex Component Exchange in July:

    Flow layout on Flex Exchange

    Since then it's been downloaded 1439 times. Just saying, it's not new.  

  3. # Anonymous Shaw Spencer

    I just read Eric's posting and realized that he does at least admit that others have tried before.  

  4. # Blogger Eric

    @Shawn
    If you check out the comment to the one on flex exchange you'll see someone comment about one of the errors I mentioned about them. I had downloaded and tried that container - and it had visible problems that i attempted to rectify.
    -Eric  

  5. # Anonymous Jake Hawkes (jamesjaco)

    Look at me! I'm famous (for sucking). When I created the Flow Container the first time I was extremely new to Flex. When I updated it to more closely resemble Darron Schall's I had just begun to understand the component lifecycle. I'm glad that my component was useful to some people, and I'm always willing to accept kind criticism - especially when it helps me become a better Flex developer.  

  6. # Blogger Slain

    FlowContainer has a number of issues when more than one is used in a view, which limits its use in Ted's dynamic creation concept (which is what I'm working on for a settings page that auto generates from the db). Basically I've found that with both FlowBox and FlowContainer that if you include 2 of them on a page, then it will break ModuleLoader, meaning none of your modules will load.

    With FlowContainer, if you try and nest them as you can with VBox, the browser hangs. FlowBox does work. My settings need to support hashmap-like complex values, so using nested containers is how you would represent that.  

Post a Comment



© 2008 Ted On Flex