Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi FontNames (https://www.delphipraxis.net/36677-fontnames.html)

Nils_13 23. Dez 2004 13:14


FontNames
 
Hi,

wie finde ich heraus, welche Fonts auf dem Computer installiert sind und stelle sie in einer ComboBox zur Auswahl für ein Richedit? Gibts da Kompos?

Die Muhkuh 23. Dez 2004 13:16

Re: FontNames
 
Hi Nils,

Delphi-Quellcode:
Combobox1.Items := Screen.Fonts;

Ultimator 23. Dez 2004 13:17

Re: FontNames
 
Eine kurze Suche nach Hier im Forum suchenfonts auflisten hätte es auch getan.

Junge, Such doch endlich mal

Nils_13 23. Dez 2004 16:13

Re: FontNames
 
Hi,

habs jetzt gelöst.

Delphi-Quellcode:
function TForm1.CurrText: TTextAttributes;
begin
  if edit.SelLength > 0 then Result := edit.SelAttributes
  else Result := edit.DefAttributes;
end;

procedure TForm1.FontNameChange(Sender: TObject);
begin
  if FUpdating then Exit;
  CurrText.Name := FontName.Items[FontName.ItemIndex];
end;
thx for all!


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:14 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz