<?xml version="1.0" encoding="utf-8"?> <!-- LabelExample.mxml --> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" viewSourceURL="srcview/index.html" creationComplete="init()"> <s:layout> <s:VerticalLayout/> </s:layout> <fx:Declarations> <s:ArrayCollection id="MyFlexHero"> <s:source> <fx:Array> <fx:Object a="1" b="One.1" c="One.2" /> <fx:Object a="2" b="Two.1" c="Two.2" /> <fx:Object a="3" b="Three.1" c="Three.2" /> <fx:Object a="4" b="Four.1" c="Four.2" /> <fx:Object a="5" b="Five.1" c="Five.2" /> <fx:Object a="6" b="Six.1" c="Six.2" /> <fx:Object a="7" b="Seven.1" c="Seven.2" /> <fx:Object a="8" b="Eight.1" c="Eight.2" /> <fx:Object a="9" b="Nine.1" c="Nine.2" /> <fx:Object a="10" b="Ten.1" c="Ten.2" /> <fx:Object a="11" b="Eleven.1" c="Eleven.2" /> <fx:Object a="12" b="Twelve.1" c="Twelve.2" /> <fx:Object a="13" b="Thirteen.1" c="Thirteen.2" /> </fx:Array> </s:source> </s:ArrayCollection> </fx:Declarations> <s:Label text="[MyFlexHero.com]:请注意,只有第一列才会出现ToolTip提示!" paddingTop="30"/> <mx:DataGrid id="dataGrid" dataProvider="{MyFlexHero}" rollOverColor="0xE9D2FF" selectionColor="0xC082FF" selectedIndex="3" width="300" rowCount="8"> <mx:columns> <mx:DataGridColumn dataField="a" headerRenderer="mx.controls.Label" headerText="Column 1234567891011121315:" /> <mx:DataGridColumn dataField="b" headerRenderer="mx.controls.Label" headerText="Column 123:" /> <mx:DataGridColumn dataField="c" headerText="Column 1234567891011121315 这个没有ToolTip:" /> </mx:columns> </mx:DataGrid> </s:Application>
flex中datagrid当字体超出长度时显示标题完整字体
最新推荐文章于 2019-02-26 17:33:09 发布