When a user clicks on a TSplitterSizer, I'd like to access the panels it is related to, for example, if it's a vertical splitter, I'd like to access the panel(s) on the left and on the right of the splitter.
-----------------------------
| | | |
| | | |
| | | |
| A | X | E |
| | | |
| | | |
| |-----------| |
| | C | B | |
| | | | |
| |-----------| |
| | D | |
| | | |
|----------------------------|
For example, in the screenshot I attached (PS: attachment didn't work, see ascii image above), when the Splitter in red is being used, I want to know that on its left there is the panel 'A', and on its right there is panels X, C and D (and ideally B as well), or the big area that contains all X,B,C and D.
In a similar way, if the blue splitter is used, I want to know that above it there is X, and below there is C and B.
The Space zone is X.
I'm trying to do that inside TSplitterSizer.Update;
I'm already accessing the splitter itself, and its .ZoneA and .ZoneB properties, with a code like this:
lZone := TLMDDockZone(FData);
lSpltr := lzone.Splitters[FData2];
LocalZoneA := lSpltr.ZoneA;
LocalZoneB := lSpltr.ZoneB;
And I'm trying to use those zones to access the panels (LocalZoneA.FPanel), but the panels as you know can be nil, depending on the layout.
So how can I find out what are the panels (in a more or less complex configuration) that are immediately to the left and to the right of a vertical splitter?
Is there a way to navigate through the list of panels or zones and find it out?
Comments