4 Replies Latest reply on Jun 21, 2010 10:09 AM by Gary<>F

    ItemRenderer width limitation

    Gary<>F Level 1

      I got this bit of Flex 4 code which creates an item renderer with a red background and some text. The background displays fine when the item renderer's width is less than 8190 or less. Anything greater, such as 8191, then the red background doesn't display.

       

      Is there some internal width limit somewhere that I don't know about?

       

      I've already set the maxWidth limit but that doesn't come into play anyhow since its default is 10,000.

       

      Does anyone have any ideas what might be going on?

       

      Code snippet:

      <?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" minWidth="955" minHeight="600">

      <fx:Declarations>

      <!-- Place non-visual elements (e.g., services, value objects) here -->

      </fx:Declarations>

       

       

      <s:Scroller width="500" height="500">

      <s:Group clipAndEnableScrolling="true">

      <s:List>

      <s:dataProvider>

      <s:ArrayCollection>

      <fx:String>what the hell</fx:String>

      </s:ArrayCollection>

      </s:dataProvider>

      <s:itemRenderer>

      <fx:Component>

      <s:ItemRenderer width="8191" maxWidth="15000">

      <s:Rect width="100%" height="100%">

      <s:fill>

      <s:SolidColor color="#FF0000"/>

      </s:fill>

      </s:Rect>

      <s:Label text="{data}"/>

      </s:ItemRenderer>

      </fx:Component>

      </s:itemRenderer>

      </s:List>

      </s:Group>

      </s:Scroller>

      </s:Application>