• Displaying a Tree control as a pop up for a Flex PopUpButton control


    The following example shows how you can use a Tree control as a PopUpButton control’s pop up in Flex
    <?xml version="1.0" encoding="utf-8"?>
    <!-- http://blog.flexexamples.com/2008/02/26/displaying-a-tree-control-as-a-pop-up-for-a-flex-popupbutton-control/ -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
            layout
    ="vertical"
            verticalAlign
    ="middle"
            backgroundColor
    ="white">

        
    <mx:Style>
            Tree {
                textAlign: left;
                fontWeight: normal;
            }
        
    </mx:Style>

        
    <mx:XML id="mlb" source="mlb.xml" />

        
    <mx:ApplicationControlBar dock="true">
            
    <mx:PopUpButton label="Please select a team">
                
    <mx:popUp>
                    
    <mx:Tree id="tree"
                            dataProvider
    ="{mlb}"
                            labelField
    ="@label"
                            showRoot
    ="false"
                            width
    ="200"
                            rowCount
    ="8" />
                
    </mx:popUp>
            
    </mx:PopUpButton>
        
    </mx:ApplicationControlBar>

    </mx:Application>

  • 相关阅读:
    [zz]利用__FILE__, __LINE__, __FUNCTION__跟踪调试程序
    [zz]va_start() 和 va_end()函数应用
    [zz]shmdt与shmctl的区别
    [zz]GNU C 扩展之__attribute__ 机制简介 [2]
    Linux errno 错误含义速查
    过滤器的简介
    MyBatis中的原理
    文件上传
    mybatis实体为什么要提供一个无参的构造函数
    为什么要有无参构造方法
  • 原文地址:https://www.cnblogs.com/taobataoma/p/1085128.html
Copyright © 2020-2023  润新知