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

Delphi控件源码

开发平台:

Delphi

  1. unit labelu;
  2. interface
  3. uses
  4.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  5.   ExtCtrls, fcLabel, ComCtrls, StdCtrls, DBCtrls, Db, DBTables, fcButton,
  6.   fcImgBtn, fcShapeBtn, fcText, fcClearPanel, fcButtonGroup, ShellAPI, Math,
  7.   fcDemoRichEdit;
  8. type
  9.   TLabelForm = class(TForm)
  10.     PageControl1: TPageControl;
  11.     TabSheet1: TTabSheet;
  12.     TabSheet2: TTabSheet;
  13.     TabSheet3: TTabSheet;
  14.     TabSheet4: TTabSheet;
  15.     TabSheet5: TTabSheet;
  16.     Panel1: TPanel;
  17.     fcButtonGroup1: TfcButtonGroup;
  18.     fcButtonGroup1fcImageBtn1: TfcImageBtn;
  19.     fcButtonGroup1fcImageBtn2: TfcImageBtn;
  20.     fcButtonGroup1fcImageBtn3: TfcImageBtn;
  21.     fcButtonGroup1fcImageBtn4: TfcImageBtn;
  22.     fcButtonGroup1fcImageBtn5: TfcImageBtn;
  23.     Panel2: TPanel;
  24.     Rotatedlabel1: TfcLabel;
  25.     embossedlabel1: TfcLabel;
  26.     ShadowLabel1: TfcLabel;
  27.     outlinedlabel1: TfcLabel;
  28.     engravedlabel1: TfcLabel;
  29.     Block3DLabel1: TfcLabel;
  30.     FunLabel1: TfcLabel;
  31.     Rotatedlabel2: TfcLabel;
  32.     BlendLabel1: TfcLabel;
  33.     Extrudelabel1: TfcLabel;
  34.     Rotatedlabel3: TfcLabel;
  35.     fcDemoRichEdit1: TfcDemoRichEdit;
  36.     Panel3: TPanel;
  37.     RotateLabel5: TfcLabel;
  38.     RotateLabel6: TfcLabel;
  39.     RotateLabel4: TfcLabel;
  40.     RotateLabel3: TfcLabel;
  41.     RotateLabel7: TfcLabel;
  42.     RotateLabel8: TfcLabel;
  43.     RotateLabel9: TfcLabel;
  44.     fcDemoRichEdit2: TfcDemoRichEdit;
  45.     Panel4: TPanel;
  46.     Shape2: TShape;
  47.     fcLabel16: TfcLabel;
  48.     fcLabel17: TfcLabel;
  49.     fcLabel18: TfcLabel;
  50.     fcLabel22: TfcLabel;
  51.     fcLabel23: TfcLabel;
  52.     fcLabel24: TfcLabel;
  53.     fcLabel25: TfcLabel;
  54.     fcLabel31: TfcLabel;
  55.     fcLabel32: TfcLabel;
  56.     fcLabel33: TfcLabel;
  57.     fcLabel35: TfcLabel;
  58.     fcLabel39: TfcLabel;
  59.     fcLabel40: TfcLabel;
  60.     RadioGroup1: TRadioGroup;
  61.     fcDemoRichEdit3: TfcDemoRichEdit;
  62.     Panel5: TPanel;
  63.     Shape1: TShape;
  64.     BlockTestLabel1: TfcLabel;
  65.     fcLabel38: TfcLabel;
  66.     fcLabel34: TfcLabel;
  67.     fcLabel37: TfcLabel;
  68.     fcLabel36: TfcLabel;
  69.     BlockTestLabel2: TfcLabel;
  70.     BlockTestLabel3: TfcLabel;
  71.     wowlabel1: TfcLabel;
  72.     wowlabel4: TfcLabel;
  73.     fcLabel48: TfcLabel;
  74.     wowlabel2: TfcLabel;
  75.     wowlabel3: TfcLabel;
  76.     fcDemoRichEdit4: TfcDemoRichEdit;
  77.     Panel6: TPanel;
  78.     MultiLineLabel1: TfcLabel;
  79.     EllipsisLabel2: TfcLabel;
  80.     fcDemoRichEdit5: TfcDemoRichEdit;
  81.     Bevel1: TBevel;
  82.     Bevel2: TBevel;
  83.     Bevel3: TBevel;
  84.     Panel7: TPanel;
  85.     fcLabel2: TfcLabel;
  86.     fcLabel1: TfcLabel;
  87.     Panel8: TPanel;
  88.     AcceleratorKeyLabel1: TfcLabel;
  89.     AcceleratorKeyLabel2: TfcLabel;
  90.     AcceleratorKeyLabel3: TfcLabel;
  91.     AcceleratorKeyLabel4: TfcLabel;
  92.     AcceleratorKeyLabel5: TfcLabel;
  93.     Edit1: TEdit;
  94.     Edit2: TEdit;
  95.     Edit3: TEdit;
  96.     Bevel4: TBevel;
  97.     Bevel5: TBevel;
  98.     Label1: TLabel;
  99.     procedure RadioGroup1Click(Sender: TObject);
  100.     procedure fcButtonGroup1Change(ButtonGroup: TfcCustomButtonGroup;
  101.       OldSelected, Selected: TfcButtonGroupItem);
  102.     procedure fcLabel1MouseEnter(Sender: TObject);
  103.     procedure fcLabel1MouseLeave(Sender: TObject);
  104.     procedure fcLabel1Click(Sender: TObject);
  105.   private
  106.     { Private declarations }
  107.   public
  108.     { Public declarations }
  109.   end;
  110. var
  111.   LabelForm: TLabelForm;
  112. implementation
  113. {$R *.DFM}
  114. procedure TLabelForm.RadioGroup1Click(Sender: TObject);
  115. begin
  116.    fcLabel39.Font.Color := clBtnFace;
  117.    case RadioGroup1.ItemIndex of
  118.       0: begin
  119.          fcLabel35.TextOptions.Style := fclsDefault;
  120.          fcLabel39.TextOptions.Style := fclsDefault;
  121.          fcLabel39.Font.Color := clBlack;
  122.          fcLabel40.TextOptions.Style := fclsDefault;
  123.          end;
  124.       1: begin
  125.          fcLabel35.TextOptions.Style := fclsRaised;
  126.          fcLabel39.TextOptions.Style := fclsRaised;
  127.          fcLabel40.TextOptions.Style := fclsRaised;
  128.          end;
  129.       2: begin
  130.          fcLabel35.TextOptions.Style := fclsLowered;
  131.          fcLabel39.TextOptions.Style := fclsLowered;
  132.          fcLabel40.TextOptions.Style := fclsLowered;
  133.          end;
  134.       3: begin
  135.          fcLabel35.TextOptions.Style := fclsOutline;
  136.          fcLabel39.TextOptions.Style := fclsOutline;
  137.          fcLabel40.TextOptions.Style := fclsOutline;
  138.          end;
  139.    end;
  140. end;
  141. procedure TLabelForm.fcButtonGroup1Change(
  142.   ButtonGroup: TfcCustomButtonGroup; OldSelected,
  143.   Selected: TfcButtonGroupItem);
  144. begin
  145.   PageControl1.ActivePage :=
  146.     (FindComponent('TabSheet'+IntToStr(Selected.Button.Tag)) as TTabSheet);
  147. end;
  148. procedure TLabelForm.fcLabel1MouseEnter(Sender: TObject);
  149. begin
  150.   (Sender as TfcLabel).Font.Color := clBlue;
  151. end;
  152. procedure TLabelForm.fcLabel1MouseLeave(Sender: TObject);
  153. begin
  154.    (Sender as TfcLabel).Font.Color := clBlack;
  155. end;
  156. procedure TLabelForm.fcLabel1Click(Sender: TObject);
  157. begin
  158.    ShellExecute(Handle, 'OPEN',
  159.      PChar('https://www.he.net/cgi-bin/suid/~wol2wol/ordering/order.cgi'),
  160.            nil, nil, sw_shownormal);
  161. end;
  162. end.