Hi,

I just spent two hours trying to figure out a seemingly simple thing. I wanted to layout widgets dynamically into rows, where each row can hold multiple widgets. The problem is, I do not necessarily know the size of the widgets and the way they are layed-out. I started off with an outer VeritcalLayoutContainer and and multiple inner HBoxLayoutContainers. This however does not work if the widget to be put into the HBoxLayoutContainer is not properly sized.

Anyways, in the end I wrote a container similar to FlowLayoutContainer but which uses floats to layout its children horizontally. So .. here it is.

Code:
import com.google.gwt.dom.client.Style.Display;
import com.google.gwt.dom.client.Style.VerticalAlign;
import com.google.gwt.user.client.ui.Widget;
import com.sencha.gxt.widget.core.client.container.FlowLayoutContainer;

public class DwHorizontalFlowLayoutContainer extends FlowLayoutContainer {

	protected VerticalAlign verticalAlign = VerticalAlign.TOP;
	
	public DwHorizontalFlowLayoutContainer() {
		super();
	}
	
	@Override
	protected void onInsert(int index, Widget child) {
		super.onInsert(index, child);
		
		child.getElement().getStyle().setDisplay(Display.INLINE_BLOCK);
		child.getElement().getStyle().setVerticalAlign(verticalAlign);
	}
	
	public void setVerticalAlign(VerticalAlign verticalAlign) {
		this.verticalAlign = verticalAlign;
	}
	
	public VerticalAlign getVerticalAlign() {
		return verticalAlign;
	}
}
To GXT-Team. I would like to see something like this added to the built-in layout-containers. Any suggestions?

Cheers
-acer