After some searching, I assume you meant NGUIMath rather than NGUITools. I tried several different approaches, but nothing is working quite right. I really need to see an example, because I'm still figuring out the basics of NGUI. I have to imagine that resizing nested containers to fit dynamic content is a fairly common task. Is there not a more general approach that doesn't require writing custom scripts?