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

Delphi控件源码

开发平台:

Delphi

  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #pragma hdrstop
  4. #include "labelu.h"
  5. //---------------------------------------------------------------------------
  6. #pragma package(smart_init)
  7. #pragma link "fcButton"
  8. #pragma link "fcButtonGroup"
  9. #pragma link "fcClearPanel"
  10. #pragma link "fcDemoRichEdit"
  11. #pragma link "fcImgBtn"
  12. #pragma link "fcLabel"
  13. #pragma resource "*.dfm"
  14. TLabelForm *LabelForm;
  15. //---------------------------------------------------------------------------
  16. __fastcall TLabelForm::TLabelForm(TComponent* Owner)
  17.         : TForm(Owner)
  18. {
  19. }
  20. //---------------------------------------------------------------------------
  21. void __fastcall TLabelForm::fcButtonGroup1Change(
  22.       TfcCustomButtonGroup *ButtonGroup, TfcButtonGroupItem *OldSelected,
  23.       TfcButtonGroupItem *Selected)
  24. {
  25.   PageControl1->ActivePage =
  26.     ((TTabSheet *)FindComponent("TabSheet"+IntToStr(Selected->Button->Tag)));
  27. }
  28. //---------------------------------------------------------------------------
  29. void __fastcall TLabelForm::fcLabel1Click(TObject *Sender)
  30. {
  31.  ShellExecute(Handle, "OPEN",
  32.    PChar("https://www.he.net/cgi-bin/suid/~wol2wol/ordering/order.cgi"), 0, 0, SW_SHOWNORMAL);
  33. }
  34. //---------------------------------------------------------------------------
  35. void __fastcall TLabelForm::fcLabel1MouseEnter(TObject *Sender)
  36. {
  37.   ((TfcLabel *)Sender)->Font->Color = clBlue;
  38. }
  39. //---------------------------------------------------------------------------
  40. void __fastcall TLabelForm::fcLabel1MouseLeave(TObject *Sender)
  41. {
  42.   ((TfcLabel *)Sender)->Font->Color = clBlack;
  43. }
  44. //---------------------------------------------------------------------------
  45. void __fastcall TLabelForm::RadioGroup1Click(TObject *Sender)
  46. {
  47.    fcLabel39->Font->Color = clBtnFace;
  48.    switch (RadioGroup1->ItemIndex) {
  49.    case 0: fcLabel35->TextOptions->Style = fclsDefault;
  50.            fcLabel39->TextOptions->Style = fclsDefault;
  51.            fcLabel39->Font->Color = clBlack;
  52.            fcLabel40->TextOptions->Style = fclsDefault;
  53.            break;
  54.    case 1: fcLabel35->TextOptions->Style = fclsRaised;
  55.            fcLabel39->TextOptions->Style = fclsRaised;
  56.            fcLabel40->TextOptions->Style = fclsRaised;
  57.            break;
  58.    case 2: fcLabel35->TextOptions->Style = fclsLowered;
  59.            fcLabel39->TextOptions->Style = fclsLowered;
  60.            fcLabel40->TextOptions->Style = fclsLowered;
  61.            break;
  62.    case 3: fcLabel35->TextOptions->Style = fclsOutline;
  63.            fcLabel39->TextOptions->Style = fclsOutline;
  64.            fcLabel40->TextOptions->Style = fclsOutline;
  65.    }
  66. }
  67. //---------------------------------------------------------------------------