MaxFontSize (Delphi)
Description
This example uses a Font dialog box, a button, and a label on a form. When you click the button, the Font dialog box appears. The font sizes available are within the range from 8 through 14. When you choose OK, the selected font is applied to the caption of the label.
Code
procedure TForm1.Button1Click(Sender: TObject);
begin
FontDialog1.Options := [fdLimitSize];
FontDialog1.MaxFontSize := 14;
FontDialog1.MinFontSize := 8;
if FontDialog1.Execute then
Label1.Font := FontDialog1.Font;
end;
Uses
- Vcl.Dialogs.TFontDialog.Options ( fr | de | ja )
- Vcl.Dialogs.TFontDialog.MaxFontSize ( fr | de | ja )
- Vcl.Dialogs.TFontDialog.MinFontSize ( fr | de | ja )