Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-33201

Width of Spark GridItemRenderer is set to 4096

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: Adobe Flex SDK 4.6 (Release)
    • Fix Version/s: None
    • Component/s: Spark: DataGrid
    • Labels:

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                hidarikani Marek Pavilovich
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: