RadioGroup示例

unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    RadioGroup1: TRadioGroup;
    Label1: TLabel;
    procedure RadioGroup1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.RadioGroup1Click(Sender: TObject);
begin
 case radiogroup1.ItemIndex of
  0: label1.Font.Name := '宋体';
  1: label1.Font.Name := '隶书';
  2: label1.Font.Name := '黑体';
  3: label1.Font.Name := '楷体';
 end;
end;

end.

 

posted @ 2011-12-05 15:17  endsnow  阅读(144)  评论(0)    收藏  举报