anchor.diff:  end;
   
   function TfpgBaseEdit.GetClientRect: TfpgRect;
  -begin
  +var
  +  rect: TRect;
  +begin
  +  Result := inherited GetClientRect;
  +  rect := fpgStyle.GetControlFrameBorders;
     case BorderStyle of
  -    ebsNone:      Result := inherited GetClientRect;
  -    ebsDefault:   Result.SetRect(2, 2, Width-4, Height-4);
  -    ebsSingle:    Result.SetRect(1, 1, Width-2, Height-2);
  +//    ebsNone:      // nothing to do
  +    ebsDefault:   InflateRect(Result, -rect.Left, -rect.Top);  { assuming borders are even on opposite sides }
  +    ebsSingle:    InflateRect(Result, -1, -1);
     end;
   end;
   
  
positive.code: end;
  
  procedure TfpgBaseEdit.SetFontDesc(const AValue: string);
  begin
    FFont.Free;
    FFont := fpgGetFont(AValue);
    if AutoSize then
    begin
      case BorderStyle of
        ebsNone:
          if Height < FFont.Height + (FHeightMargin * 2) then
            Height:= FFont.Height + (FHeightMargin * 2);
        ebsDefault:
          if Height < FFont.Height + 4 + (FHeightMargin * 2) then
            Height:= FFont.Height + 4 + (FHeightMargin * 2);
        ebsSingle:
          if Height < FFont.Height + 2 + (FHeightMargin * 2) then
            Height:= FFont.Height + 2 + (FHeightMargin * 2);
      end;
    end;
    Adjust;
  
negative.code: end;
  
  procedure TfpgBaseEdit.SetHeightMargin(const AValue: integer);
  var
    rect: TRect;
  begin
    if (FHeightMargin = AValue) or (AValue <= 0) then
      Exit; //=>
    FHeightMargin := AValue;
    if AutoSize then
    begin
      rect := fpgStyle.GetControlFrameBorders;
      case BorderStyle of
        ebsNone:
          Height := FFont.Height + (FHeightMargin * 2);
        ebsDefault:
          Height := FFont.Height + rect.Top + rect.Bottom + (FHeightMargin * 2);
        ebsSingle:
          Height := FFont.Height + rect.Top + rect.Bottom + (FHeightMargin * 2);
      end;
    end;
    Repaint;
  end;
  
  