anchor.diff:            FBottomPanel.Visible := FCanPage
       end
     else
  +  begin
  +    LWasVisible := FBottomPanel.Visible;
       FBottomPanel.Visible := FCanPage;
  +    if (FTopPanel.Visible <> LWasVisible) and RecalcPageCount then
  +      Exit;
  +  end;
   
     // show or hide Search Panel (related to option vgoAutoHideSearchPanel)
     if (vgoAutoHideSearchPanel in FOptions) and (FPageCount in [0,1]) then
  
positive.code: var
    LCountOnPage2: Integer;
    LGridUnusedHeight, LPotentialHeight: integer;
  
    function RecalcPageCount: boolean;
    var
  
negative.code:     if FCanSearch then
      begin
        // if widget control is set, only hide search controls
        LWasVisible := FTopPanel.Visible;
        FTopPanel.Visible := Assigned(FWidgetControl);
        FTopPanelRight.Visible := not Assigned(FWidgetControl);
        if (FTopPanel.Visible <> LWasVisible) and RecalcPageCount then
          Exit;
      end;
    end
    else
    begin
      LWasVisible := FTopPanel.Visible;
      FTopPanel.Visible := FCanSearch;
      FTopPanelRight.Visible := true;
      if (FTopPanel.Visible <> LWasVisible) and RecalcPageCount then
        Exit;
    end;
  
  