Einzelnen Beitrag anzeigen

TiGü

Registriert seit: 6. Apr 2011
Ort: Berlin
3.060 Beiträge
 
Delphi 10.4 Sydney
 
#2

AW: MDLabel: Komponente verbessern. Bitte um Mithilfe

  Alt 8. Jun 2020, 09:41
2) Das die Links zwei eigene Schriften (TFont-Instanzen) haben, ist dir aber bewusst?

Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
begin
  FMDLabel1 := TMDLabel.Create(Self);
  FMDLabel1.Parent := Self;
  FMDLabel1.Align := TAlign.alTop;
  FMDLabel1.Name := 'FMDLabel1';
  FMDLabel1.LinkFontNormal.Style := FMDLabel1.LinkFontNormal.Style + [fsBold];
  FMDLabel1.LinkFontHover.Style := FMDLabel1.LinkFontHover.Style + [fsBold];
  

  FMDLabel2 := TMDLabel.Create(Self);
  FMDLabel2.Parent := Self;
  FMDLabel2.Align := TAlign.alBottom;
  FMDLabel2.Name := 'FMDLabel2';
  FMDLabel2.LinkFontNormal.Style := FMDLabel2.LinkFontNormal.Style + [fsBold, fsItalic];
  FMDLabel2.LinkFontHover.Style := FMDLabel2.LinkFontHover.Style + [fsBold, fsItalic];

  FMDLabel1.Caption := FMDLabel1.Name + ' 0 <b>1<a>google.de</a>2</b> 3 ';
  FMDLabel2.Caption := FMDLabel2.Name + ' 0 <b><i>1<a>google.de</a>2</i></b> 3 ';
end;
  Mit Zitat antworten Zitat