Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi ComboBox1.Items := (ordner).Fonts; (https://www.delphipraxis.net/6834-combobox1-items-%3D-ordner-fonts%3B.html)

horst 24. Jul 2003 09:15


ComboBox1.Items := (ordner).Fonts;
 
wie kann ich mir die fonts eines ordners in einer combobox anzeigen lassen?
mit:
ComboBox1.Items := Screen.Fonts;
kriege ich ja die systemfonts.

Nalincah 24. Jul 2003 09:29

Re: ComboBox1.Items := (ordner).Fonts;
 
Also in einem Ordner sind Fonts und die sollen in der combobox angezeigt werden?

horst 24. Jul 2003 09:31

Re: ComboBox1.Items := (ordner).Fonts;
 
jepp 100% :dancer:

Nalincah 24. Jul 2003 09:32

Re: ComboBox1.Items := (ordner).Fonts;
 
ich probier mal was
moment

Nalincah 24. Jul 2003 09:34

Re: ComboBox1.Items := (ordner).Fonts;
 
Liste der Anhänge anzeigen (Anzahl: 1)
Guck dir das mal an

Nalincah 24. Jul 2003 09:37

Re: ComboBox1.Items := (ordner).Fonts;
 
Vergiss das
ich bastel mal was edleres :D

Nalincah 24. Jul 2003 09:46

Re: ComboBox1.Items := (ordner).Fonts;
 
Liste der Anhänge anzeigen (Anzahl: 1)
Ich denk mal das ist genau das was du brauchst

horst 24. Jul 2003 09:51

Re: ComboBox1.Items := (ordner).Fonts;
 
danke funktioniert :bounce2:
aber das funktioniert dann irgendwie nicht ;)
Delphi-Quellcode:
memo1.Font.Name := ComboBox1.Items[ComboBox1.ItemIndex];

Nalincah 24. Jul 2003 09:56

Re: ComboBox1.Items := (ordner).Fonts;
 
Ich glaub wie du das machen willst klappt das nur wenn die Fonts im Windows/Fonts Verzeichnis ist

Probier mal
Delphi-Quellcode:
var
s:string;
i:integer;
begin
  s := ComboBox1.Items[ComboBox1.ItemIndex];
  for i := length(s) downto 0 do
  begin
    if s[i] = '\' then
    break;
  end;
  Edit1.Font.Name := copy(s,i+1,length(s)
end;
Mehr weiss ich auch nicht

[edit=Daniel B]Delphi-Tags korrigiert. Mfg, Daniel B[/edit]

horst 24. Jul 2003 10:08

Re: ComboBox1.Items := (ordner).Fonts;
 
ne leider auch nicht, könnte mir auch vorstellen das das nur mit dem windows verzeichnis funktioniert.
big thx für deine hilfe ;)

Nalincah 24. Jul 2003 10:12

Re: ComboBox1.Items := (ordner).Fonts;
 
Vielleicht kannst du versuchen die font in das windows\fonts-verzeichnis zu kopieren, dann benutzen und danach wieder löschen. Weiß aber nicht wie. Such mal was in der Libary bei kopieren.

horst 24. Jul 2003 10:13

Re: ComboBox1.Items := (ordner).Fonts;
 
die idee ist gut, nur was ist wenn der fontordner 600 mb groß ist

Nalincah 24. Jul 2003 10:15

Re: ComboBox1.Items := (ordner).Fonts;
 
der windows/font oderner oder der den du ausliest?

horst 24. Jul 2003 10:16

Re: ComboBox1.Items := (ordner).Fonts;
 
den ich versuche auszulesen ...

Nalincah 24. Jul 2003 10:20

Re: ComboBox1.Items := (ordner).Fonts;
 
Du sollst ja auch nicht alle kopieren, sondern immer nur die, die benutzt wirst. Pass aber auf. Wenn in deinem Ordner ne Font "Arial.ttf" ist und du die in "C:\Windows\Fonts\" kopieren willst gibts die da ja meistens schon. Wenn du die jetzt überschreibst und danach löscht ist sie weg. Also nur reinkopieren wenn es die Schrift noch nicht gibt

horst 24. Jul 2003 10:21

Re: ComboBox1.Items := (ordner).Fonts;
 
stimmt das könnte ich versuchen ...merci


Alle Zeitangaben in WEZ +1. Es ist jetzt 16:59 Uhr.

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