Vcl.Dialogs.TFontDialog.Font

Aus RAD Studio API Documentation
Wechseln zu: Navigation, Suche

Delphi

property Font: TFont read FFont write SetFont;

C++

__property Vcl::Graphics::TFont* Font = {read=FFont, write=SetFont};

Eigenschaften

Typ Sichtbarkeit Quelle Unit Übergeordnet
property published
Vcl.Dialogs.pas
Vcl.Dialogs.hpp
Vcl.Dialogs TFontDialog

Beschreibung

Gibt die ausgewählte Schrift an.

Sobald vom Benutzer im Dialogfeld eine Schrift ausgewählt und auf OK geklickt wurde, wird die ausgewählte Schrift in der Eigenschaft Font gespeichert. Um beim Öffnen des Dialogfeldes eine Standardschrift anzuzeigen, weisen Sie der Eigenschaft Font im Objektinspektor oder im Programmcode einen Wert zu.

FontDialog1.Font := Form1.Font; if FontDialog1.Execute then for i := 0 to (Form1.ControlCount - 1) do if (Form1.Controls[i] is TButton) then (Form1.Controls[i] as TButton).Font := FontDialog1.Font

FontDialog1->Font = Form1->Font; if (FontDialog1->Execute()) Button1->Font = FontDialog1->Font;

Siehe auch

Codebeispiele