rem: var itemSizer = new wxGridSizer(6, 8, 0); 
add: var itemSizer = new wxGridSizer(6, 4, 0); 
context: 	display: function() {		if (this.loaded)			return;		// Size of texture preview images		var w = 120, h = 40;				this.panel.sizer = new wxBoxSizer(wxOrientation.VERTICAL);		var scrolled = new wxScrolledWindow(this.panel, -1, wxDefaultPosition, wxDefaultSize, wxWindow.VSCROLL);		scrolled.setScrollRate(0, 10);		this.panel.sizer.add(scrolled, 1, wxStretch.EXPAND);				var itemSizer = new wxGridSizer(6, 8, 0);		scrolled.sizer = itemSizer;				// Adjust the number of columns to fit in the available area		scrolled.onSize = function (evt) {			var numCols = Math.max(1, Math.floor(evt.size.width / (w+16)));			if (itemSizer.cols != numCols)				itemSizer.cols = numCols;		};				var previews = Atlas.Message.GetTerrainGroupPreviews(this.name, w, h).previews;		var i = 0;		var names = [];		for each (var p in previews)		{			// Create a wrapped-text label (replacing '_' with ' ' so there are more wrapping opportunities)			var labelText = p.name.replace(/_/g, ' ');			var label = new wxStaticText(scrolled, -1, labelText, wxDefaultPosition, wxDefaultSize, wxStaticText.ALIGN_CENTER);			label.wrap(w);						var imgSizer = new wxBoxSizer(wxOrientation.VERTICAL);			var button = new wxBitmapButton(scrolled, -1, p.imagedata);			button.terrainName = p.name;			button.onClicked = onTerrainSelect;			imgSizer.add(button, 0, wxAlignment.CENTRE);			imgSizer.add(label, 1, wxAlignment.CENTRE);			itemSizer.add(imgSizer, 0, wxAlignment.CENTRE | wxStretch.EXPAND);		}		this.loaded = true;	}
meta: 4	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/4/a1f78e2822a8b6bdec52a8d9875d51ef3d603e80/terrain.js/clean/binaries/data/tools/atlas/scripts/section/terrain.js