Vcl.Dialogs.TFontDialog.Font
Delphi
property Font: TFont read FFont write SetFont;
C++
__property Vcl::Graphics::TFont* Font = {read=FFont, write=SetFont};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | Vcl.Dialogs.pas Vcl.Dialogs.hpp |
Vcl.Dialogs | TFontDialog |
Description
Indicates the selected font.
When the user selects a font in the dialog box and clicks OK, the selected font becomes the value of the Font property. To make a default font appear in the dialog when it opens, assign a value to Font in the Object Inspector or in program code.
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;
See Also
Code Examples