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>

  • 相关阅读:
    lua类对象
    toLua初始化碰到的问题
    Unity经验之谈-DoTween动画结束匿名委托闭包之坑
    toLua关于委托没有注册的解决方案
    xLua使用require改变路径加载Lua脚本
    unity常用的比较函数
    Shader中颜色混合的算法
    UnityShader中插值平滑曲线
    Shader中的Uniforms(只读标识)
    ShaderLab中Properties语义块支持的属性类型
  • 原文地址:https://www.cnblogs.com/taobataoma/p/1034842.html
Copyright © 2011-2022 走看看