Have you looked at Ext.container.Container? It already does what you're describing.