There is a convenience function will will either create a collider or re-size an existing collider to the size of the widget (including children). The shortcut in the editor is alt + shift + c and I think the code is in NGUITools.cs. I don't have the code open right now so I can't verify the class it's in, just look in the NGUI menu and search the code for the "make a collider" and you'll see where it is.