this.addEventListener(FlexEvent.CREATION_COMPLETE, onCreationComplete);

public function onCreationComplete(event:FlexEvent):void {
ChangeWatcher.watch(this,"width", showWidth);
}

public function showWidth(e:Event):void {
Alert.show(this.width);
}


--- In [email protected], "valdhor" <valdhorli...@...> wrote:
>
> What does canvas.measuredWidth give when the user clicks the button?
> 
> 
> --- In [email protected], "jmfillman" <jmfillman@> wrote:
> >
> > I have a canvas container with="100%". When the user clicks a button, the 
> > container is set to percentWidth=20, and I need to immediately know the new 
> > width so that I can properly re-size elements in the container to match the 
> > new width.
> > 
> > From what I can tell, the LayoutManager doesn't get to measuring the new 
> > width of the container right away. If the user clicks the button again, the 
> > LayoutManager has done it's thing and has set the width value of the canvas.
> > 
> > So the question is, how do I get the new width of the canvas as soon as I 
> > set percentWidth=20?
> >
>


Reply via email to