欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Flex DataGrid HeaderRender 实例

程序员文章站 2022-05-05 17:39:02
...
	<mx:DataGridColumn id="column_1" width="{SMALL_COLUMN_WIDTH}" sortable="true" headerRenderer="com.DataGridHeader" 
							   headerText="No."  dataField="runnerNumber">
				<mx:itemRenderer>
					<fx:Component>
						<mx:Box	width="30" height="100%" verticalAlign="middle" verticalScrollPolicy="off" horizontalScrollPolicy="off" buttonMode="true" useHandCursor="true" mouseChildren="false">
							<mx:Label text="{data.runnerNumber}" width="100%"  height="15" textAlign="center"  buttonMode="true" useHandCursor="true" mouseChildren="false" />
						</mx:Box>
					</fx:Component>
				</mx:itemRenderer>
			</mx:DataGridColumn>
 
<?xml version="1.0" encoding="utf-8"?>
<s:MXDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
						  xmlns:s="library://ns.adobe.com/flex/spark"
						  xmlns:mx="library://ns.adobe.com/flex/mx"
						  focusEnabled="true"
						  autoDrawBackground="false"
						  >
	<s:Label id="lblData" buttonMode="true" useHandCursor="true"
			 text="{dataGridListData.label}"
			 top="0"
			 left="0"
			 right="0"
			 bottom="0"
			 paddingLeft="4"
			 paddingRight="4"
			 verticalAlign="middle"
			 />
</s:MXDataGridItemRenderer>