anchor.diff:  
     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
  -        bh := ButtonHeight;  // initialize button height
           if (y > lp) and (y < lp + bh) then
           begin
             if h <> ActivePage then
  
positive.code: begin
    Result := nil;
    h := TfpgTabSheet(FPages.First);
  
    lp := FMargin;
    if MaxButtonWidthSum > (Width-(FMargin*2)) then
      h := FFirstTabButton;
  
    case TabPosition of
      tpTop:
  
negative.code: {
      fpGUI  -  Free Pascal GUI Toolkit
  
      Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
      distribution, for details of the copyright.
  
      See the file COPYING.modifiedLGPL, included in this distribution,
  