[Flex] PopUpButton系列 —— 将DataGrid作为弹出内容

编程入门 行业动态 更新时间:2024-10-24 22:26:57

[Flex] PopUpButton系列 —— 将DataGrid作为<a href=https://www.elefans.com/category/jswz/34/1771144.html style=弹出内容"/>

[Flex] PopUpButton系列 —— 将DataGrid作为弹出内容

<?xml version="1.0" encoding="utf-8"?>
<!--Flex中如何创建一个可以弹出DataGrid作为菜单的PopUpButton的例子 PopUpButtonDataGrid.mxml-->
<s:Application xmlns:fx="" xmlns:s="library://ns.adobe/flex/spark" xmlns:mx="library://ns.adobe/flex/mx" minWidth="955" minHeight="600"><fx:Script><![CDATA[import mx.collections.ArrayCollection;]]></fx:Script><fx:Declarations><!-- 将非可视元素(例如服务、值对象)放在此处 --><fx:Array id="arr"><fx:Object label="《霹雳先锋》香港票房8916612" actor="Steven Chow"/><fx:Object label="《捕风汉子》香港票房3149395" actor="Steven Chow"/><fx:Object label="《小偷阿星》香港票房7968106 " actor="Steven Chow"/><fx:Object label="笑傲江湖之东方不败(1992)" actor="Jet Li"/><fx:Object label="精武英雄(1994)" actor="Jet Li"/><fx:Object label="给爸爸的信(1995)" actor="Jet Li"/></fx:Array></fx:Declarations><fx:Style>@namespace s "library://ns.adobe/flex/spark";@namespace mx "library://ns.adobe/flex/mx";mx|PopUpButton {popUpStyleName: myCustomPopUpStyleName;}.myCustomPopUpStyleName {fontWeight: normal;textAlign: left;}</fx:Style><mx:PopUpButton id="popUpButton" label="Click to open..." openAlways="true"><mx:popUp><!--<mx:DataGrid dataProvider="{arr}" draggableColumns="true" rowCount="4"     width="400"><mx:columns><mx:DataGridColumn dataField="label"  headerText="workers:" /><mx:DataGridColumn dataField="actor"  headerText="actors:" /></mx:columns></mx:DataGrid>--><s:DataGrid dataProvider="{new ArrayCollection(arr)}"  height="100" width="400" ><s:columns><s:ArrayList><s:GridColumn dataField="label" headerText="workers:"/><s:GridColumn dataField="actor" headerText="actors:"/></s:ArrayList></s:columns></s:DataGrid></mx:popUp></mx:PopUpButton>
</s:Application>

 

转载于:.html

更多推荐

[Flex] PopUpButton系列 —— 将DataGrid作为弹出内容

本文发布于:2024-02-17 15:07:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1694465.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:弹出   系列   内容   Flex   PopUpButton

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!