The question sounds trivial, just set virtualLayout
to false, but that's not what I'm after.
I've got the following situation. My Flex mobile app has predefined containers, usually half the width of the total application width. The user can maximize these components, so that they take up all the available width.
Naturally, for components that show data in a List
or DataGroup
, the renderers have to resize. That works out of the box, but I need them to show additional information when the components are maximized.
For that to work I created a very simple method to update the renderers;
private function updateRenderer():void {
_itemRenderer.properties = {isFullScreen: _isFullScreen, headerProperties:_headerProperties, visibleColumns:_visibleColumns, optimalColWidth:_optimalColWidth, grid:this.name, fids:_fids};
_list.itemRenderer = _itemRenderer;
}
The renderer properties, such as visibleColumns change accordingly and since the renderers will be invalidated automatically during a resize, they can redraw with the new properties.
That is all fine, but unfortunately, new renderers are created with this kind of procedure, instead of simply reusing the existing ones and let them redraw themselves.
Is there any way to alter this behavior, or does someone know a better way to accomplish a task like this?