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 >



    本文转自 OldHawk  博客园博客,原文链接:http://www.cnblogs.com/taobataoma/archive/2008/02/28/1085128.html,如需转载请自行联系原作者






相关文章
|
23天前
|
容器
Bootstrap5 Flex(弹性)布局4
排序:.order 类可设置弹性子元素的排序,范围从 .order-1 至 .order-12,数字越小优先级越高。外边距:.ms-auto 和 .me-auto 分别用于设置子元素的右侧和左侧外边距为 auto。包裹:.flex-nowrap(默认)、.flex-wrap 和 .flex-wrap-reverse 用于控制弹性容器中的子元素是否换行及换行方向。