There is a reason _width and _height are private.  Use width and height. 
backgroundColor creates a true background.  Canvas itself has no internal 
parts unless you use that style, therefore, by default it has no _width or 
_height, hence the need for wrapper getter/setters, width and height to hold 
values for setting it's size even though it's true MovieClip values have 
none.


----- Original Message ----- 
From: "Stanislav Zayarsky" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, December 09, 2005 12:08 PM
Subject: [flexcoders] Size of the container, bug or feature?


Hello Guys,

Can please someone explain to me next thing, let's review the code:

<mx:Script>
   function showSize() {
        mx.controls.Alert.show(String(cv._width) + "  " + String 
(cv._height));
   }
</mx:Script>

<mx:Canvas id="cv"
                   width="100%"
                   height="100%"
                   backgroundColor="#000066"
                   creationComplete="showSize();"/>

It shows some numbers > 0. That's ok.

But if we just remove backgroundColor property, then it shows 0,0.

Best regards
Stanislav



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to