1 Reply Latest reply on Jun 25, 2007 8:46 AM by muzikathzi

    Itemrenderer with height greater than 70

    muzikathzi Level 1
      Hi everyone.

      I`ve the following problem with a listComponent:
      I've build my own itemRenderer and for testing issues it´s just the following simple thing:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Canvas xmlns:mx=" http://www.adobe.com/2006/mxml" height="70" >
      </mx:Canvas>

      When I set the height greater than 70 the scrollbar of the list has the wrong length.
      In fact it has always the same length undependent of how many items there are in the list.
      It seems the calculation of the list-height is wrong as soon as I increase the height of the itemrenderer.

      thanks very much for every hint!

      kathi

      Here is the code of the creation of the list:

      private function buildVariantList(itemRenderer:ClassFactory):void{
      variantListContainer.removeAllChildren();
      variantList = new List();
      this.variantList.addEventListener("change", variantChanged);
      this.variantList.addEventListener("dragEnter", acceptLibraryElementDrag);
      this.variantList.addEventListener("dragDrop", dropLibraryElement);
      this.variantList.percentHeight = 100;
      this.variantList.percentWidth = 100;
      this.variantList.itemRenderer = itemRenderer;
      variantListContainer.addChild(this.variantList);

      this.variantList.variableRowHeight = true;

      }