Try this:

do not directly calculate your screen changes, but do this in the 
updateDisplayList method.When receiving the ResizeEvent, only call the 
invalidateDisplayList() method, which sets a framework flag that will 
trigger execution of updateDisplayList()
Also there are events specific events fired on maximize/restore events that you 
can use to trigger an extra re-draw in these cases if the stock life-cycle 
event flow is not meeting your needs.

> Date: Mon, 25 Nov 2013 14:03:40 -0600
> Subject: Problem resizing TileGroup
> From: [email protected]
> To: [email protected]
> 
> I have screens that are generated at the run time. I am using a TileGroup
> as a main container for such screens. When a screen construction is done I
> am recalculating the total height of the TileGroup and change it. Here is
> the code I am using for that:
> 
> private function resizeTileGroup():void
> {
> var maxH:int = 0;
> for (var i:int=1;i<=mainWindow.rowCount;i++)
> {
> var elt:DisplayObject = mainWindow.getChildAt(i * mainWindow.columnCount -
> mainWindow.columnCount);
> maxH += elt.height;
> }
> mainWindow.height = maxH + mainWindow.verticalGap * mainWindow.rowCount;
> }
> 
> I dont have any problem with the code itself, but when a user changes a
> screen size by clicking on Restore down button this particular screen is
> not wrapped properly.
> Fields are overlapping each other. If I dont resize TiltGroup with the
> above code then there is no problem with screen resizing. Any ideas, please?
> 
> Thanks
                                          

Reply via email to