Cómo dividir en dos paneles con la misma altura

Could you tell me how to split page on two parts using SplitLayoutPanel and UI builder. I want to have horizontal line to resize both panels.

He tratado

<g:SplitLayoutPanel ui:field="main">
    <g:north size="50" unit="PCT">
    <g:south size="50" unit="PCT">

But I have two lines.

preguntado el 24 de agosto de 12 a las 09:08

1 Respuestas

Trata <g:center> for one of the two panels.

And specify unit in <g:SplitLayoutPanel unit="PCT"> not in each part (that force you to use the same unit for all parts).

If you use N and S, it will put N, S and a center using the remaining space (it doesn't realize that 50% + 50% ocuppies all the available space).

If you use N and center, it will say: use 50% for North and the rest (50%) for center.

Respondido 24 ago 12, 09:08

That is better. Now I have one line. How to split on 50% of height - Enrique

Doesn't the line appear on 50% of the height? Or the problem is when resizing? I'm not sure of the behaviour at resizing... - Helios

Doesn't the line appear on 50% of the height - Enrique

Class SplitLayoutPanel has no appropriate setUnit() method Element <g:SplitLayoutPanel ui:field='main' unit='PCT'> - Enrique

You're right. Javadoc says: This panel is used in the same way as DockLayoutPanel, except that its children's sizes are always specified in Style.Unit.PX units, and each pair of child widgets has a splitter between them that the user can drag. So you could make it manual. - Helios

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.