Easy example:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute">
<mx:Script>
       <![CDATA[
               private function onClick(evt:MouseEvent):void
               {
                       trace("Height: "+v1.height);
                       trace("Measured Height: "+ v1.measuredHeight);
               }
       ]]>
</mx:Script>
       <mx:Canvas id="v1" width="500" height="400" creationPolicy="all">
               <mx:Button x="10" y="10" label="Click Me"
click="onClick(event)" />
       </mx:Canvas>
</mx:Application>


trace return:

Height: 400
Measured Height: 0

2008/10/10 Emile Swain <[EMAIL PROTECTED]>:
> I've been having a similar issue, and I'm not one hundred percent sure how
> to correct it.
> However you should try setting the creationPolicy to "all".
>
> Other may also be able to help if you provide a snippet of your code as an
> example.
>
>
> On 10/10/2008 11:32, "Giro" <[EMAIL PROTECTED]> wrote:
>
>
>
>
> But measuredWidth and measuredHeight return 0  for me.
>
> Giro.
>
> 2008/10/10 David Gironella <[EMAIL PROTECTED]
> <mailto:david.gironella%40gmail.com> >:
>> But measuredWidth and measuredHeight return 0  for me.
>>
>> Giro.
>>
>> 2008/10/10 Emile Swain <[EMAIL PROTECTED]
>> <mailto:emile.swain%40akqa.com> >:
>>> I believe the measuredWidth and measuredHeight properties can help you
>>> here.
>>>
>>>
>>> On 10/10/2008 11:18, "Giro" <[EMAIL PROTECTED]
>>> <mailto:giro%40enhoresdefeina.com> > wrote:
>>>
>>>
>>>
>>>
>>> I can know the real height and width of a canvas components. I need to
>>> know real height and wind not only visible area, this need to include
>>> scrolled area.
>>>
>>> Thks.
>>>
>>> Grio.
>>>
>>>
>>>
>>>
>>> --
>>> Emile Swain
>>> Direct: 020 7780 4859
>>> Group Creative Development Director
>>>
>>> [EMAIL PROTECTED] <mailto:Emile.Swain%40akqa.com>     |
>>>    http://www.akqa.com
>>> AKQA, 1 St John's Lane, London EC1M 4BL, UK
>>>
>>> Confidentiality notice:
>>> The information transmitted in this email and/or any attached document(s)
>>> is
>>> confidential and intended only for the person or entity to which it is
>>> addressed and may contain privileged material. Any review,
>>> retransmission,
>>> dissemination or other use of, or taking of any action in reliance upon
>>> this
>>> information by persons or entities other than the intended recipient is
>>> prohibited. If you received this in error, please contact the sender and
>>> delete the material from any computer.
>>>
>>
>
>
>
>
> --
> Emile Swain
> Direct: 020 7780 4859
> Group Creative Development Director
>
> [EMAIL PROTECTED]    |    http://www.akqa.com
> AKQA, 1 St John's Lane, London EC1M 4BL, UK
>
> Confidentiality notice:
> The information transmitted in this email and/or any attached document(s) is
> confidential and intended only for the person or entity to which it is
> addressed and may contain privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in reliance upon this
> information by persons or entities other than the intended recipient is
> prohibited. If you received this in error, please contact the sender and
> delete the material from any computer.
> 

Reply via email to