Controls top changes on TPageControl

Hi,

We are currently using Delphi version 4 and are experiencing a problem that
also occured in Delphi 3.

In our application we tried to perform same idea that was introduced in
Delphi 4 which was anchors. We created a list that would hold objects that
contained a controls Top, Left, Right and Bottom along with another control
to which it would be attached. From here we could figure out the distance
between the edge of each control and as the form was resized we could then
reposition the controls.

The problem we ran into was on the TPageControl object. From debugging the
problem it seems that when a control belongs to a TTabSheet that isn't the
ActivePage initially, the top of control is shifted up once the TTabSheet
selected. This was discovered in debugging our code where it calculates the
gap between a resizing control and the edge of the control it is attached
to. If a TButton appeared on a TTabSheet with a top of 216 then after it's
handle was created it would have a top of 192. From what I calculated, this
looks like the height of the Tab at the top of a TTabSheet.

Does anyone have an idea for a work around or is there any way that this
could be fixed or changed in the future? We set up the our resize list after
a form is all streamed in, during the OnCreate event of the form. Also we
can't use the Anchors property always since we have rules for a Control
attached to an invisible control to shift its position into the invisible
control's position. And in some cases the Anchors property doesn't work the
way we want it to work.

Any help is appreaciated.

Thanks,

Stephen Kluczkiewicz
Sage U.S. Timeslips Division

skluczkiew...@timeslips.com