Einzelnen Beitrag anzeigen

Benutzerbild von sakura
sakura

Registriert seit: 10. Jun 2002
Ort: München
11.412 Beiträge
 
Delphi 11 Alexandria
 
#2

Re: TFontdialog.Options lesen?

  Alt 7. Jan 2004, 16:09
Das ist wohl etwas, was MS so nicht als Option vorgesehen hat, aber folgender Code wäre ein mögliches Workaround:

Delphi-Quellcode:
  FontDialog1.Options := FontDialog1.Options + [fdNoFaceSel];
  // Namen auf #0 setzen
  FontDialog1.Font.Name := #0;
  if FontDialog1.Execute then
    // wenn name nicht #0 dann
    if FontDialog1.Font.Name <> #0 then
      Label1.Caption := FontDialog1.Font.Name
    else
      // sonst keine neue Font gewählt
      Label1.Caption := '*wuppdi*';
......
Daniel W.
Ich bin nicht zurück, ich tue nur so
  Mit Zitat antworten Zitat