• Alternating row colors in a Flex Tree control using the alternatingItemColors style


    The following example shows how you can alternate item colors in a Flex Tree control by setting the alternatingItemColors 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-alternatingitemcolors-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.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"
                alternatingItemColors
    ="[#DFDFDF,#EEEEEE]"
                rowCount
    ="4"
                width
    ="300" />

    </mx:Application>

  • 相关阅读:
    我们的微信小程序开发
    node.js的模块引用
    关于 node.js的request事件
    关于 node.js 小插曲
    发给
    Kotlin 委托(1)类委托、变量委托注意事项
    Kotlin 扩展
    关于dex 64K 引用限制
    c++新特性实验(5)声明与定义:属性列表(C++11 起)
    apk反编译(6)用ProGuard 混淆、压缩代码,压缩资源。
  • 原文地址:https://www.cnblogs.com/taobataoma/p/1034846.html
Copyright © 2020-2023  润新知