Spark Tree – faster, with icons and text colors

I’ve just updated the Spark Tree custom component. Here are the improvements and new features.

  • Code is optimized and runs smoothly even on 1000 and more elements
  • iconFunction:Function property
  • iconField:String property
  • iconOpenField:String property
  • folderOpenIcon style
  • folderClosedIcon style
  • defaultLeafIcon style
  • textRollOverColor style
  • textSelectedColor style

View Demo
View Source
Download Spark Tree source

12 responses to “Spark Tree – faster, with icons and text colors”

  1. On the first glance, your implementation looks very good.

    Relying on mx.controls.treeClasses.DefaultDataDescriptor, that was cool.

    If your project is currently under development, I suggest to move your code to GitHub, may be you will gain some contributions… someday )

  2. Hi,

    Your component seem very interresting. Unfortunatly, it doesn’t seem implement the “openitems” property as the mx tree do.

    Is there a way to do it easily ?

    Thanks

  3. Hi,

    I’m trying to get the SparkTree working with Flex 4.6?
    Could you give me an advice how to do that?

    Many Thanks,
    Stefan

  4. Hey there – at the moment, the tree automatically closes all child branches when closing a branch. Is it possible to prevent this?

    Many thanks – Kim

  5. Btw – have noticed an issue with using virtualLayout and itemRenderer recycling.
    If a selected item is scrolled out of view, when it is scrolled back into view it re-dispatches the ITEM_SELECTED event.

    I’ve fixed this by using useVirtualLayout=false when adding the component to my project, but maybe there’s a better way.

    Cheers – Kim

  6. That explains a lot.. I’m working with an existing code base, so I assumed all the classes I had were part of the original SparkTree code.
    Apologies for the confusion. My tree implementation will probably max out at around 30 items, so it’s not a big issue for now.

    Thanks for taking the time to answer all my queries though :)

    Kim

Leave a Reply