Properly designed UIComponent subclasses report a measuredWidth/Height (and measuredMinWidth/MinHeight) via the measure() method, and are subsequently given a size by their parent which may not be those sizes in updateDisplayList() where they draw graphics and/or size place children. Those children may extend outside the bounds and may be masked if needed. However, the width and height properties of the UIComponent will be the size given by the parent while getRect will return the bounding box of the children
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of toofah_gm Sent: Friday, January 25, 2008 10:29 AM To: [email protected] Subject: [flexcoders] getRect returns rectangle that includes children's bounds, is there an alternate I want to use getRect to get the bounds of my UIComponent. I just noticed that if my UIComponent has children that extend beyond the X/Y/Width/Height of my parent UIComponent, the rect returned extends to the boundaries of the largest child. Is there an alternate method that I could use? My hack to get around this is to override getRect and have it use another child that I force to be the size of the parent, whose size I am interested in. Thanks! Another problem that I see seems related. The hitTestObject method seems to have the same problem. It seems to be finding matches even though the parent UIComponent is clearly not a match. It must also be using boundaries of the children. Any thoughts? Thanks!

