anchor.diff:  begin
     Result := nil;
     h := TfpgTabSheet(FPages.First);
  -
     lp := FMargin;
  -  if MaxButtonWidthSum > (Width-(FMargin*2)) then
  -    h := FFirstTabButton;
   
     case TabPosition of
       tpTop:
  
positive.code: 
    if TabPosition in [tpTop, tpBottom] then
    begin
      if (y > p1) and (y < p2) then
      begin
         while h <> nil do
  
negative.code: 
    if TabPosition in [tpLeft, tpRight] then
    begin
      bh := ButtonHeight;  // initialize button height
      if MaxButtonHeightSum > (Height-(FMargin*2)) then
        h := FFirstTabButton;
      if (x > p1) and (x < p2) then
      begin
        while h <> nil do
        begin
          if (y > lp) and (y < lp + bh) then
          begin
            if h <> ActivePage then
  