views:

854

answers:

1

I have a form with three sections, and I want to allow the users to resize them as they please

There is one section on the left (which take the whole height) and one on the right that is again cut in two vertically. See below:

11|22
11|---
11|33

Using one splitter is quite easy:

Component1.align := alLeft
Splitter1.align := alLeft
Component2.align := alClient

Now, starting with that I have absolutely no idea how to get a vertical splitter working. If I set my second splitter to alTop or alBottom, it does all the way to the top/bottom and not only in the right half.

I manage to get something like this:

11111
--------
22||33

By creating the vertical split first, and then the horizontal one, but that doesn't work the other way.

One possible solution is to use a panel as my right side and then use a splitter INSIDE this pannel for vertical splitting but it doesn't really feels like the right way.

Thanks

+12  A: 

The extra Panel is the right way. Trying to have 2 Splitters inside one ClientArea is just overtaxing the Alignment system. Besides, the cost of an extra TPanel is very low.

Henk Holterman
Yes when you need anything complex with splitters, Tpanel's are the way to go
Toby Allen