Hello Greber.
You may be able to use this also, to control the way the sub-panels overlap:
SetPanelAttribute (panelHandle, ATTR_ZPLANE_POSITION, 0);
From the attribute help:
"Constant: ATTR_ZPLANE_POSITION
Data Type: int
Description: The drawing order of the child panel. The panel with the lowest number (0) is drawn last (i.e., on top).
Valid for child panels only."
Colin.