View Full Version : RowLayout help

3 Jun 2008, 7:19 AM
I would like to have three ContentPanels fill up the space on the screen (Fill Horizontal and Fill Vertical) so that each panel is 1/3 the space on the screen.

I was previously using RowData.FillType.BOTH to fill horizontal and vertical space.
Beta-4 has removed these Enums/constants and I do not see how to do the equivalent.

In the RowLayout documentation, it is mentioned that each component has the ability to size itself as a pixel number or as a percentage. I cannot get the percentage to work on ContentPanel (e.g., setWidth("100%") called before adding the panel to a container). Is this a bug? Or am I missing something (most likely)?


3 Jun 2008, 7:30 AM
Just kidding.
After further review of the documentation, I've found the solution:

public RowData(double width, double height)Creates a new row data.
Parameters: width - the width, values of 1 or less treated as percentages height - the height, values of 1 or less treated as percentages

3 Jun 2008, 9:18 AM
I have a panel with a TextArea and a Button and was using RowLayout() to layout the TextArea over the button, such that both components filled horizontally but the Button had a fixed height (e.g. 25) and the TextArea would fill vertically as well. In Beta3 I would have the RowData for the TextArea using Fill "BOTH" and the Button use Fill "WIDTH". I tried to accomplish the same thing with Beta4 by having the TextArea use RowData(1, Style.DEFAULT) and the Button use RowData(1, 25), but it doesn't seem to layout as expected. Anyone else seeing this problem or have a solution?


4 Jun 2008, 6:05 AM

Same here: Migrated from GXT beta 3 to GXT beta 4 and GWT 1.5 and experience the following:

I add widget a with RowData(1, 1), then widget b with RowData(1, Style.DEFAULT).
Previously, this resulted in b taking the space it needed in the bottom and a taking the rest.
Now, a does not take any space and a takes the full height.

Maybe there a better way to achieve the previously experienced behavior with a RowLayout, ideas?