Dynamically replace sizer object with another sizer object in scrollable panel

I have a scrollable panel inside a tabs container. The scrollabe panel uses fixed-width sizer to layout a grid of objects.

How would I replace the fixed-width sizer with another fixed-width sizer?

Finally figured out how to do it:

var scrollablePanel = this.tabs.getElement('#scrollPanel', true);
var sizer = scrollablePanel.getElement('panel');
sizer.removeAll(true);
this.refreshGrid(sizer);
scrollablePanel.layout();

this.refreshGrid(sizer) simply loops through the array of objects and adds them with sizer.add().