The chart's FullExtent is a record of two TDoublePoints, a and b: a is the lower left corner, b the upper right corner of the chart's axis range. A TDoublePoint is a record of x and y double values.
Denoting, like in your code, the FullExtent by the variable ex, the x values of a "normal" chart range between ex.a.x and ex.b.x, and the y values range between ex.a.y and ex.b.y.
However, a series can be "rotated" such that its x values are plotted along the y axis and its y values are plotted along the x axis. If this series covers the entire chart, ex.a.x now corresponds to the minimum of the series y values (not x values!).
To avoid lengthy "if" instructions for checking the case of rotated series, Alexander Klenin introduced the concept of the type TDoublePointBoolArr - this is another way to represent two double values, now not as a record, but as an array indexed by a boolean variable. When that boolean variable is false, the TDoublePointBoolArr refers to the first, otherwise to the second double value. Since TDoublePointBoolArr and TDoublePoint have the same memory layout (two double values in each case) the DoublePointBoolArray can be used to access the elements of the TDoublePoint without using an explicit "if" instruction. So, in other words, the cast
TDoublePointBoolArr(ex.a)[false] is nothing but ex.a.x, and
TDoublePointBoolArr(ex.a)[true] is the same as
ex.a.y. The expression
lowerPos := TDoublePointBoolArr(ex.a)[false] + MIN_SIZE + HALF_GAP;
is nothing else but
lowerPos := ex.a.x + MIN_SIZE + HALF_GAP;
I applied this concept in the original multi-pane demo because it displays horizontal and vertical pane orientations. On the first page of the PageIndex the dividing line determines the y coordinate, on the second page the x coordinate of the pane borders.
In your example, this is useless and you could use the TDoublePoint elements directly.
And it is wrong because - as I said - TDoublePointBoolArr(ex.a)[false] refers to the x value of the extent, but you want to limit the y value of the series. Therefore, you must use "true" as boolean parameter (or, more simply, ex.a.y directly).
This also solves the issue that the topmost pane can be move in an apparently unlimited way.