You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Justin Mclean (JIRA)" <ji...@apache.org> on 2013/09/16 03:34:51 UTC

[jira] [Updated] (FLEX-33201) Width of Spark GridItemRenderer is set to 4096

     [ https://issues.apache.org/jira/browse/FLEX-33201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Mclean updated FLEX-33201:
---------------------------------

    Labels: easyfix easytest  (was: )
    
> 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
>              Labels: easyfix, easytest
>
> 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