incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marek Pavilovich (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLEX-33201) Width of Spark GridItemRenderer is set to 4096
Date Mon, 17 Sep 2012 07:25:07 GMT
Marek Pavilovich created FLEX-33201:
---------------------------------------

             Summary: Width of Spark GridItemRenderer is set to 4096
                 Key: FLEX-33201
                 URL: https://issues.apache.org/jira/browse/FLEX-33201
             Project: Apache Flex
          Issue Type: Bug
          Components: Spark: DataGrid
    Affects Versions: Adobe Flex SDK 4.6 (Release)
            Reporter: Marek Pavilovich
            Priority: Minor


Create a data grid:

<?xml version="1.0" encoding="utf-8"?>
<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">
	<s:DataGrid>
		<s:columns>
			<s:ArrayList>
				<s:GridColumn itemRenderer="ItemRenderer"
							  dataField="foo"/>
			</s:ArrayList>
		</s:columns>
		<s:dataProvider>
			<s:ArrayList>
				<fx:Object foo="bar"/>
			</s:ArrayList>
		</s:dataProvider>
	</s:DataGrid>
</s:Application>

And an item renderer:

<?xml version="1.0" encoding="utf-8"?>
<s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" 
					xmlns:s="library://ns.adobe.com/flex/spark" 
					xmlns:mx="library://ns.adobe.com/flex/mx">
	
	<fx:Script>
		<![CDATA[
			override public function prepare(hasBeenRecycled:Boolean):void {
				trace(width);
			}
		]]>
	</fx:Script>
	
	<s:Label text="{label}"/>
	
</s:GridItemRenderer>

The application will output:

0
4096
87

The width of the item renderer is set to 4096 before the second call to prepare. If the item
renderer sets the width of its child elements to this.width the application will output

0
4096
4096

The renderer will remain too wide.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message