zoukankan      html  css  js  c++  java
  • Alternating row colors in a Flex Tree control using the depthColors style

    The following example shows how you can alternate item colors based on the item’s depth in a Flex Tree control by setting the depthColors style to an array of colors
    <?xml version="1.0" encoding="utf-8"?>
    <!-- http://blog.flexexamples.com/2007/11/27/alternating-row-colors-in-a-flex-tree-control-using-the-depthcolors-style/ -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
            layout
    ="vertical"
            verticalAlign
    ="middle"
            backgroundColor
    ="white">

        
    <mx:XMLListCollection id="xmlListColl">
            
    <mx:source>
                
    <mx:XMLList>
                    
    <node label="One">
                        
    <node label="One.1">
                            
    <node label="One.1.1">
                                
    <node label="One.1.1.1">
                                    
    <node label="One.1.1.1.1" />
                                
    </node>
                            
    </node>
                        
    </node>
                        
    <node label="One.2" />
                        
    <node label="One.3" />
                    
    </node>
                    
    <node label="Two">
                        
    <node label="Two.1" />
                        
    <node label="Two.2" />
                        
    <node label="Two.3" />
                    
    </node>
                
    </mx:XMLList>
            
    </mx:source>
        
    </mx:XMLListCollection>

        
    <mx:Tree id="tree"
                dataProvider
    ="{xmlListColl}"
                labelField
    ="@label"
                depthColors
    ="[#FFFFFF, #EEEEEE, #DDDDDD, #CCCCCC, #BBBBBB, #AAAAAA]"
                rowCount
    ="4"
                width
    ="300" />

    </mx:Application>

  • 相关阅读:
    pytest 框架生成 pytest
    pytest 之数据驱动参数化:pytest.mark.parametrize
    web 网站表单测试、搜索查询测试、删除测试、数据库测试知识点
    pytest 之 fixture 的前置后置功能
    pytest 框架之pytest-html报告生成
    Initialization of bean failed; nested exception is java.lang.
    使用jmeter测试Oracle&&MySQL数据库性能
    jmeter的日常特殊参数化
    压测出现各种奇葩问题,求围观
    weblogic性能调优
  • 原文地址:https://www.cnblogs.com/taobataoma/p/1034842.html
Copyright © 2011-2022 走看看