Hi,

I am trying to use tooltip to show x/y/width/height for some of the 
UIComponents in my app. But it shows 0 for all these values, while a
similar function call for the click event works fine. Can anyone explain
the reason behind this?

Here is the code snippet:

<!--ActionScript-->
[Bindable]
private function getPosSiz(comp:UIComponent):String
{
    return comp+"> x: "+comp.x+"; y: "+comp.y+"; w:
"+comp.measuredWidth+"; h: "+comp.height;
}
private function tracePosSiz(comp:UIComponent):void
{
    trace(comp+"> x: "+comp.x+"; y: "+comp.y+"; w: "+comp.width+"; h:
"+comp.height);
}

<!--MXML-->
<mx:Button id="prevBtn" label="&#0060;" click="tracePosSiz(prevBtn);"
toolTip="{getPosSiz(prevBtn)}"/>

Reply via email to