anchor.diff:      FLayout: TLayout;
       FWrapText: boolean;
       FWrappedText: TStringList;
  +    FLineSpace: integer;
       procedure   Wrap(MaxLength: integer; AText: string);
       procedure   SetWrapText(const AValue: boolean);
       procedure   SetAlignment(const AValue: TAlignment);
  
positive.code: 
  procedure TfpgCustomLabel.Wrap(MaxLength: integer; AText: string);
  var
    l: integer;
  begin
    FWrappedText.Clear;
    l := 0;
    repeat
      if UTF8Pos(' ', AText) > 0 then
      begin
        if Font.TextWidth(UTF8Copy(AText, 1, UTF8Pos(' ', AText))) < MaxLength then
        begin
          if FWrappedText.Count > 0 then
            if (Font.TextWidth(FWrappedText[Pred(FWrappedText.Count)] + ' ' +
                UTF8Copy(AText, 1, UTF8Pos(' ', AText)))) < MaxLength then
              FWrappedText[Pred(FWrappedText.Count)] := FWrappedText[Pred(FWrappedText.Count)] + ' '
                  + UTF8Copy(AText, 1, Pred(UTF8Pos(' ', AText)))
            else
              FWrappedText.Add(UTF8Copy(AText, 1, Pred(UTF8Pos(' ', AText))))
          else
            FWrappedText.Add(UTF8Copy(AText, 1, Pred(UTF8Pos(' ', AText))));
          AText := UTF8Copy(AText, Succ(UTF8Pos(' ', AText)), UTF8Length(AText) - Pred(UTF8Pos(' ', AText)));
        end
        else
        begin
          FWrappedText.Add(UTF8Copy(AText, 1, Pred(UTF8Pos(' ', AText))));
          if l < Font.TextWidth(UTF8Copy(AText, 1, UTF8Pos(' ', AText))) then
            l := Font.TextWidth(UTF8Copy(AText, 1, UTF8Pos(' ', AText)));
          AText := UTF8Copy(AText, Succ(UTF8Pos(' ', AText)), UTF8Length(AText) - Pred(UTF8Pos(' ', AText)));
        end;  { if/else }
      end
      else
      begin
        FWrappedText.Add(AText);
        AText := '';
      end;  { if/else }
    until UTF8Pos(' ', AText) = 0;
    
    if FWrappedText.Count > 0 then
    begin
      if (Font.TextWidth(FWrappedText[Pred(FWrappedText.Count)] + ' ' + AText)) < MaxLength then
        FWrappedText[Pred(FWrappedText.Count)] := FWrappedText[Pred(FWrappedText.Count)] + ' ' + AText
      else
        FWrappedText.Add(AText);
    end;
  
    if AutoSize then
    begin
      if Height < FWrappedText.Count * (Font.Height + 2) then
        Height := FWrappedText.Count * (Font.Height + 2);
      if Width < l then  	// adjust the length to the longest word
        Width := l;
    end;
  end;
  
  procedure TfpgCustomLabel.SetWrapText(const AValue: boolean);
  
negative.code: 
  // A convenience function to create a TfpgLabel instance
  function CreateLabel(AOwner: TComponent; x, y: TfpgCoord; AText: string; w: TfpgCoord= 0; h: TfpgCoord= 0;
            HAlign: TAlignment= taLeftJustify; VAlign: TLayout= tlTop; ALineSpace: integer= 2): TfpgLabel; overload;
  
  implementation
  
  
  function CreateLabel(AOwner: TComponent; x, y: TfpgCoord; AText: string; w: TfpgCoord; h: TfpgCoord;
            HAlign: TAlignment; VAlign: TLayout; ALineSpace: integer): TfpgLabel; overload;
  begin
    Result       := TfpgLabel.Create(AOwner);
    Result.Left  := x;
    Result.Top   := y;
    Result.Text  := AText;
    Result.LineSpace := ALineSpace;
    if w = 0 then
    begin
      Result.Width := Result.Font.TextWidth(Result.Text) + 5;  // 5 is some extra spacing
  