# Is it possible to have two panels deployed with borderlayout?

asked 2020-04-23 18:48:26 +0800

softteam
120 7

I mean, I want to have two panels open and when I fold one panel the other takes up all its space and vice versa. ¿is it possible with borderlayout or another component? I illustrate with images what I want

The best solution found is this:

<borderlayout>
<center border="none">
<borderlayout>
<center border="none" autoscroll="true">

</center>
<south id="" title="_Facturación pendiente en el periodo"  size="100%" collapsible="true" splittable="true"   open="true" >

</south>
</borderlayout>
</center>
<south id="" title="_Facturas registradas en el periodo" size="50%" border="none"  splittable="true" collapsible="true" open="true">

</south>
</borderlayout>


But when I collapse the north layer it is not positioned up

delete retag edit

Sort by » oldest newest most voted

answered 2020-04-29 15:47:49 +0800

MDuchemin
1688 1 5

Hi there,

This kind of structure can be done more easily with splitlayout:

https://zkfiddle.org/sample/1rdv1e2/1-splitlayout

Or with a tabbox in accordion mold (although accordion will only display 1 of the panels at a time):

https://zkfiddle.org/sample/1rdv1e2/2-tabbox

The main difficulty with borderlayout is that it is meant to have a "center" panel on focus all the time. This center usually is not moving or resizing while the rest of the panels arrange themselves around it. Do you have a specific requirement, or structure in which you need to use splitlayout? Otherwise, I think splitlayout is the better option.

Yes, in the end I opted to use the splitlayout but I wanted a visual option like the one in borderlayout where I visualize the title with the border and the arrow that makes it more intuitive for the user

( 2020-04-30 23:27:49 +0800 )edit

You can consider using a title bar with an arrow on the bottom of the top container, and one on the top of the bottom container.

( 2020-05-04 16:54:51 +0800 )edit

Since the splitlayout can be controled from any event, you can wire these bars to open / toggle the status of the splitlayout

( 2020-05-04 16:55:29 +0800 )edit
[hide preview]

## Stats

Asked: 2020-04-23 18:48:26 +0800

Seen: 5 times

Last updated: Apr 29

Support Options
• Email Support
• Training
• Consulting
• Outsourcing