home *** CD-ROM | disk | FTP | other *** search
- unit Unit1;
-
- interface
-
- uses
- WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, ExtCtrls
- {$IFDEF WIN32}
- , fontlis2
- {$ELSE}
- , fontlis1
- {$ENDIF}
- ;
-
- type
- TForm1 = class(TForm)
- FontListBox1: TFontListBox;
- RadioGroup1: TRadioGroup;
- procedure RadioGroup1Click(Sender: TObject);
- procedure FontListBox1DblClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.RadioGroup1Click(Sender: TObject);
- begin
- FontListBox1.FontType := TFontType(RadioGroup1.ItemIndex) ;
- Caption := IntToStr(FontListBox1.Items.Count) + ' fonts available' ;
- end;
-
- procedure TForm1.FontListBox1DblClick(Sender: TObject);
- begin
- Font.Name := FontListBox1.SelectedFont ;
- end;
-
- end.
-