imagetabformu.pas
上传用户:hylc_2004
上传日期:2014-01-23
资源大小:46800k
文件大小:2k
源码类别:

Delphi控件源码

开发平台:

Delphi

  1. unit imagetabformu;
  2. interface
  3. uses
  4.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  5.   ComCtrls, ExtCtrls, fcClearPanel, fcButtonGroup, fcImage, fcImageForm,
  6.   fcButton, fcImgBtn, fcShapeBtn, fcLabel;
  7. type
  8.   TImageTabForm = class(TForm)
  9.     fcImageForm1: TfcImageForm;
  10.     fcButtonGroup1: TfcButtonGroup;
  11.     fcButtonGroup1fcImageBtn1: TfcImageBtn;
  12.     fcButtonGroup1fcImageBtn2: TfcImageBtn;
  13.     fcButtonGroup1fcImageBtn3: TfcImageBtn;
  14.     fcButtonGroup1fcImageBtn4: TfcImageBtn;
  15.     Shape1: TShape;
  16.     fcLabel1: TfcLabel;
  17.     fcShapeBtn1: TfcShapeBtn;
  18.     PageControl1: TPageControl;
  19.     TabSheet1: TTabSheet;
  20.     TabSheet2: TTabSheet;
  21.     TabSheet3: TTabSheet;
  22.     TabSheet4: TTabSheet;
  23.     fcLabel2: TfcLabel;
  24.     fcLabel3: TfcLabel;
  25.     fcLabel4: TfcLabel;
  26.     fcLabel5: TfcLabel;
  27.     procedure fcShapeBtn1Click(Sender: TObject);
  28.     procedure fcButtonGroup1Change(ButtonGroup: TfcCustomButtonGroup;
  29.       OldSelected, Selected: TfcButtonGroupItem);
  30.     procedure FormShow(Sender: TObject);
  31.   private
  32.     { Private declarations }
  33.   public
  34.     { Public declarations }
  35.   end;
  36. var
  37.   ImageTabForm: TImageTabForm;
  38. implementation
  39. {$R *.DFM}
  40. procedure TImageTabForm.fcShapeBtn1Click(Sender: TObject);
  41. begin
  42.   Close;
  43. end;
  44. procedure TImageTabForm.fcButtonGroup1Change(
  45.   ButtonGroup: TfcCustomButtonGroup; OldSelected,
  46.   Selected: TfcButtonGroupItem);
  47. begin
  48.   PageControl1.ActivePage :=
  49.     (FindComponent('TabSheet'+IntToStr(Selected.Button.Tag)) as TTabSheet);
  50. end;
  51. procedure TImageTabForm.FormShow(Sender: TObject);
  52. begin
  53.   PageControl1.ActivePage := TabSheet1;
  54. end;
  55. end.