Bruno, duas sugestões:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="initApp()">
<mx:Script>
<![CDATA[
import mx.core.Container;
private function initApp():void{
cv2.addEventListener("includeInLayoutChanged",
checkIncludeInLayout); //nao use esse evento, pois e usado so por
UIComponent
vb.addEventListener(Event.RESIZE, checkResize);
}
private function checkIncludeInLayout(evt:Event):void{
trace("include in layout? "+Container
(evt.currentTarget).includeInLayout + ", height? "+vb.height)
}
private function checkResize(evt:Event):void{
trace("measuredHeight? "+Container
(evt.currentTarget).measuredHeight) //use deste jeito
}
]]>
</mx:Script>
<mx:VBox borderStyle="solid" borderThickness="3" id="vb">
<mx:Canvas width="200" height="200" backgroundColor="#AAAA88"/>
<mx:Canvas width="200" height="200" backgroundColor="#00FF55"
id="cv2" includeInLayout="{cb.selected}" visible="{cb.selected}"/>
<mx:CheckBox label="mostra canvas dois" selected="true"
id="cb"/>
</mx:VBox>
</mx:Application>
--~--~---------~--~----~------------~-------~--~----~
Você recebeu esta mensagem porque está inscrito na lista "flexdev"
Para enviar uma mensagem, envie um e-mail para [email protected]
Para sair da lista, envie um email em branco para
[email protected]
Mais opções estão disponíveis em http://groups.google.com/group/flexdev
-~----------~----~----~----~------~----~------~--~---