anchor.diff:  end;
   
   procedure TfpgBaseEdit.SetHeightMargin(const AValue: integer);
  +var
  +  rect: TRect;
   begin
     if (FHeightMargin = AValue) or (AValue <= 0) then
       Exit; //=>
     FHeightMargin := AValue;
  -  case BorderStyle of
  -    ebsNone:
  -      Height:= FFont.Height + (FHeightMargin * 2);
  -    ebsDefault:
  -      Height:= FFont.Height + 4 + (FHeightMargin * 2);
  -    ebsSingle:
  -      Height:= FFont.Height + 2 + (FHeightMargin * 2);
  +  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;
   
  
positive.code: end;
  
  function TfpgBaseEdit.GetClientRect: TfpgRect;
  begin
    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);
    end;
  end;
  
  
negative.code: end;
  
  procedure TfpgBaseEdit.SetFontDesc(const AValue: string);
  var
    rect: TRect;
  begin
    FFont.Free;
    FFont := fpgGetFont(AValue);
    if AutoSize then
    begin
      rect := fpgStyle.GetControlFrameBorders;
      case BorderStyle of
        ebsNone:
          if Height < FFont.Height + (FHeightMargin * 2) then
            Height := FFont.Height + (FHeightMargin * 2);
        ebsDefault:
          if Height < FFont.Height + rect.Top + rect.Bottom + (FHeightMargin * 2) then
            Height := FFont.Height + rect.Top + rect.Bottom + (FHeightMargin * 2);
        ebsSingle:
          if Height < FFont.Height + rect.Top + rect.Bottom + (FHeightMargin * 2) then
            Height := FFont.Height + rect.Top + rect.Bottom + (FHeightMargin * 2);
      end;
    end;
    Adjust;
  