PDA

View Full Version : Specific Layout Question



darthwes
20 Oct 2010, 5:36 AM
I'm trying to create a panel with two grids, both as wide as their container, one above the other. I'd like the top grid to take up about 75% of the useable vertical space, and the bottom grid to take the remaining 25%. I'd also like to put a split in between the grids so my users can change the height.

I've tried vbox, but flex seems to be mutually exclusive with split. I have tried using a border layout, but I have to give a real height to at least one grid to get it working. Unfortunately I want to see my grids take up height based on % of the total height as opposed to a hardcode which looks ok on my screen, but like crap on smaller resolutions.

I feel like I'm hovering on the answer, could someone give me a pointer?

Condor
20 Oct 2010, 5:40 AM
VBoxLayout doesn't support a splitter (although there is a user extension that adds them IIRC).

The Feature request section contains one of my patches that adds percentage width and height support to BorderLayout.

darthwes
20 Oct 2010, 5:41 AM
Is it anchor that I need to be using?

Condor
20 Oct 2010, 5:44 AM
No, anchor layout also doesn't support splitters.

darthwes
20 Oct 2010, 6:21 AM
Thank you, Condor. You are most helpful.