unit MaxFontSize;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Button1: TButton;
    FontDialog1: TFontDialog;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

// BeginExample: MaxFontSize
// Property: Dialogs.TFontDialog.Options
// Property: Dialogs.TFontDialog.MaxFontSize
// Property: Dialogs.TFontDialog.MinFontSize

// BeginCode
{
This example uses a Font dialog box, a button, and a label
on a form. When the user clicks the button, the Font dialog
box appears. The font sizes available are within the range
of 8 to 14. When the user chooses OK, the selected font is
applied to the caption of the label.
} 
procedure TForm1.Button1Click(Sender: TObject);
begin
  FontDialog1.Options := [fdLimitSize];
  FontDialog1.MaxFontSize := 14;
  FontDialog1.MinFontSize := 8;
  if FontDialog1.Execute then
    Label1.Font := FontDialog1.Font;
end;
// EndCode
// EndExample: MaxFontSize
end.
