Hello all,
Im creating a new component from scratch and I want to add itemRenderer
support to it. Basically, it is a vertical repeater that accepts custom
itemRenderers to render data.
I have almost everything working but there's one point where I dont see
the light :)
My component extends from UIComponent and I create the renderers inside
the commitProperties function:
var renderer: * = _itemRendererFactory.newInstance();
IDataRenderer(renderer).data = _items[i];
renderers[i] = renderer;
renderer.x = 0;
renderer.y = i * ( this._rowHeight +
this._verticalGap );
addChild(renderer);
Now, inside the updateDisplayList ( where I obtain the container's width
) I resize the renderers:
for each( var renderer: * in renderers ) {
renderer.width = this.width;
renderer.height = this._rowHeight;
}
This works if this._rowHeight == CustomRenderer.mxml's height BUT
imagine I have a fixed height for the itemRenderer bigger than
this._rowHeight. Lets say I use CustomRenderer.mxml ( an HBox with
height="40" ), then, this component SHOULD show scrollbars on every
renderer but, instead, it doenst show any scrollbar and thus I can only
see the first this._rowHeight pixels defined for every renderer.
What am I doing wrong?
Thanks
Alberto