You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by mark goldin <ma...@gmail.com> on 2013/12/13 16:56:46 UTC

Re: Problem resizing TileGroup

How would I receive ResizeEvent in my TileGroup?


On Mon, Nov 25, 2013 at 2:29 PM, David Coleman <
david_coleman_007@hotmail.com> wrote:

> 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: markzolotoy@gmail.com
> > To: users@flex.apache.org
> >
> > 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
>
>

RE: Problem resizing TileGroup

Posted by David Coleman <da...@hotmail.com>.
add a resize listener in the component definition

> Date: Fri, 13 Dec 2013 09:56:46 -0600
> Subject: Re: Problem resizing TileGroup
> From: markzolotoy@gmail.com
> To: users@flex.apache.org
> 
> How would I receive ResizeEvent in my TileGroup?
> 
> 
> On Mon, Nov 25, 2013 at 2:29 PM, David Coleman <
> david_coleman_007@hotmail.com> wrote:
> 
> > 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: markzolotoy@gmail.com
> > > To: users@flex.apache.org
> > >
> > > 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
> >
> >