开发者

Very custom / horizontal tree view in Flex

I am not sure if it possible or what would be the best way to archive the following in Adobe Flex 4 (I am also fine with Flex 3).

I need some kind of a tree view, 开发者_开发技巧but the items should be placed like a tree from top to down and not like it is done in the treeview implementation of the Flex framework. To make it more clear here an simple "graphic":

            1
    ------------------
    2                3
--------        ----------
4      5        6        7

Is it possible to skin the Flex tree view to look like my example? If not, how create a custom component that is usable like a native Flex component (attach handlers to every node, make it skinnable) and creates structures like above.


this is called org chart! :))) try to google about flex org chart

http://blog.frankula.com/?p=148

http://coolestflex.blogspot.com/2008/10/organization-chart-orgchart.html


This is too much for mx:Tree to bend like that. Design your own control, it's a great deal of experience to gain. Think out how you want nodes to be laid out, how to draw branches. If you can fit all elements into rectangular grid, that would be easy to manage:

         root
          |
 |+|--------------|-|
  |                |
 branch         branch   

Decide if you need collapsible branches, vertical lines. Divide it all to simple elements and implement each based on UIComponents. Draw lines on graphics, compose branches from Labels in some boxes.

Sometimes it is much better and clean to make your own control. I made smooth-scrolling list in one day, with virtualized items. Before that, I lost a week trying to make Flex List scroll smoothly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜