In updateDisplayList, see if the parameters are 0. If they are, check measuredWIdth/Height and explicitWIdth/Height to see if either are 0. It sounds like explicitWIdth/Height may have gotten set to 0 somewhere
Alex Harui Flex SDK Developer Adobe Systems Inc.<http://www.adobe.com/> Blog: http://blogs.adobe.com/aharui From: [email protected] [mailto:[email protected]] On Behalf Of flexwdw Sent: Thursday, September 10, 2009 11:08 AM To: [email protected] Subject: [flexcoders] HBox not sizing properly...how to kick it in the head Hello. I have a situation where I have an object that extends HBox. This object has a variable number of children. The object gets created and added to it's parent at runtime. The reason I chose HBox is because it will size itself. I want the width and the height of the HBox to be the width and height of the components inside the HBox. So, when I do this, my hbox simply does not appear when it should...if I override updateDipslayList and set a breakpoint inside it, I find that the width and the height are both zero (and yes, this is after all the child objects have been added). Inside updateDisplayList, the children all have valid widths and heights. So, I don't understand what's going on here. Is there something I need to do to get the HBox to kick itself in the head and recalculate it's size. Neither invalidateSize or invalidateDisplayList on the HBox seem to effect the layout. So, I know I can go in and figure out how big this thing should be myself and size it appropriately, but I'd like to understand what I am not getting here, because it sure seems like there should be a better solution. thanks for any advice...

