⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 editorsstylesdemomain.cpp

📁 DevExpress ExpressQuantumGrid Suite v5.9 Full Source
💻 CPP
📖 第 1 页 / 共 2 页
字号:
  cxHintStyleController->HintStyle->Color = clInfoBk;
  cxHintStyleController->HintStyle->Font->Color = clBlack;
  cxHintStyleController->HintStyle->Font->Height = -11;
  cxHintStyleController->HintStyle->Font->Style.Clear();
  cxHintStyleController->HintStyle->IconType = cxhiInformation;
  cxHintStyleController->HintStyle->IconSize = cxisDefault;
  cxHintStyleController->HintStyle->Rounded = false;
}
//---------------------------------------------------------------------------

void __fastcall TEditorsStylesDemoDemoMainForm::SetLightSlideLeftHintStyle()
{
  if (!ShowHint) ShowHint = true;
  cxHintStyleController->HintStyle->Standard = false;
  cxHintStyleController->HintStyle->Animate = cxhaSlideFromLeft;
  cxHintStyleController->HintStyle->Color = TColor(0x00EDCBB6);
  cxHintStyleController->HintStyle->Font->Color = clBlack;
  cxHintStyleController->HintStyle->Font->Height = -13;
  cxHintStyleController->HintStyle->Font->Style.Clear();
  cxHintStyleController->HintStyle->IconType = cxhiCurrentApplication;
  cxHintStyleController->HintStyle->IconSize = cxisSmall;
  cxHintStyleController->HintStyle->Rounded = false;
}
//---------------------------------------------------------------------------

void __fastcall TEditorsStylesDemoDemoMainForm::SetBlueSlideUpHintStyle()
{
  if (!ShowHint) ShowHint = true;
  cxHintStyleController->HintStyle->Standard = false;
  cxHintStyleController->HintStyle->Animate = cxhaSlideUpward;

  cxHintStyleController->HintStyle->Color = TColor(0x00EDBB87);
  cxHintStyleController->HintStyle->Font->Color = TColor(0x00AD3F29);
  cxHintStyleController->HintStyle->Font->Height = -13;
  cxHintStyleController->HintStyle->Font->Style.Clear();
  cxHintStyleController->HintStyle->IconType = cxhiCustom;
  cxHintStyleController->HintStyle->IconSize = cxisDefault;
  cxHintStyleController->HintStyle->Rounded = false;
}
//---------------------------------------------------------------------------

void __fastcall TEditorsStylesDemoDemoMainForm::SetRoundedInfoHintStyle()
{
  if (!ShowHint) ShowHint = true;
  cxHintStyleController->HintStyle->Standard = false;
  cxHintStyleController->HintStyle->Animate = cxhaFadeIn;
  cxHintStyleController->HintStyle->Color = clInfoBk;
  cxHintStyleController->HintStyle->Font->Color = clBlack;
  cxHintStyleController->HintStyle->Font->Height = -11;
  cxHintStyleController->HintStyle->Font->Style.Clear();
  cxHintStyleController->HintStyle->IconType = cxhiInformation;
  cxHintStyleController->HintStyle->IconSize = cxisDefault;
  cxHintStyleController->HintStyle->Rounded = true;
}
//---------------------------------------------------------------------------

void __fastcall TEditorsStylesDemoDemoMainForm::SetStandardHintStyle()
{
  if (!ShowHint) ShowHint = true;
  cxHintStyleController->HintStyle->Color = clInfoBk;
  cxHintStyleController->HintStyle->Standard = true;
}
//---------------------------------------------------------------------------

void __fastcall TEditorsStylesDemoDemoMainForm::SetNoHintStyle()
{
  ShowHint = false;
}
//---------------------------------------------------------------------------

void __fastcall TEditorsStylesDemoDemoMainForm::SetHintStyle(TcxHintType AHintType)
{
  switch (AHintType) {
    case hcstLightInfo: {
      SetLightInfoHintStyle(); break; }
    case hcstLightSlideLeft: {
      SetLightSlideLeftHintStyle(); break; }
    case hcstBlueSlideUp: {
      SetBlueSlideUpHintStyle(); break; }
    case hcstRoundedInfo: {
      SetRoundedInfoHintStyle(); break; }
    case hcstStandard: {
      SetStandardHintStyle(); break; }
    case hcstNoHint: {
      SetNoHintStyle(); break; }
    default: SetLightInfoHintStyle();
  }
}
//---------------------------------------------------------------------------

void __fastcall TEditorsStylesDemoDemoMainForm::miCurDisplayStyleClick(
      TObject *Sender)
{
  ((TMenuItem*)Sender)->Checked = true;
  UncheckMenuItems(miDefDisplayStyle);
  DefaultDisplayStyle = false;
  ActiveFrame->DisplayStyle = (TcxStyleSheetType)((TMenuItem*)Sender)->Tag;
  gbDescription->Color = ActiveFrame->GetStyleBackgroundColor();
  gbDescription->CaptionBkColor = ActiveFrame->GetStyleBackgroundColor();
}
//---------------------------------------------------------------------------

void __fastcall TEditorsStylesDemoDemoMainForm::miDefaultDisplayStyleClick(
      TObject *Sender)
{
  ((TMenuItem*)Sender)->Checked = true;
  UncheckMenuItems(miCurDisplayStyle);
  DefaultDisplayStyle = true;
  FCurrentDisplayStyle = (TcxStyleSheetType)((TMenuItem*)Sender)->Tag;
  ActiveFrame->ChangeDisplayStyle((TcxStyleSheetType)((TMenuItem*)Sender)->Tag);
  gbDescription->Color = ActiveFrame->GetStyleBackgroundColor();
  gbDescription->CaptionBkColor = ActiveFrame->GetStyleBackgroundColor();
}
//---------------------------------------------------------------------------

void __fastcall TEditorsStylesDemoDemoMainForm::miCurHintStyleClick(
      TObject *Sender)
{
  DefaultHintStyle = false;
  UncheckMenuItems(miDefHintStyle);
  ((TMenuItem*)Sender)->Checked = true;
  ActiveFrame->HintStyle = (TcxHintType)((TMenuItem*)Sender)->Tag;
  SetHintStyle((TcxHintType)((TMenuItem*)Sender)->Tag);
}
//---------------------------------------------------------------------------

void __fastcall TEditorsStylesDemoDemoMainForm::miHintStyleClick(
      TObject *Sender)
{
  DefaultHintStyle = true;
  UncheckMenuItems(miCurHintStyle);
  ((TMenuItem*)Sender)->Checked = true;
  SetHintStyle((TcxHintType)((TMenuItem*)Sender)->Tag);
}
//---------------------------------------------------------------------------

void __fastcall TEditorsStylesDemoDemoMainForm::miLookAndFeelKindClick(TObject *Sender)
{
  LookAndFeelController->Kind = (TcxLookAndFeelKind)((TMenuItem*)Sender)->MenuIndex;
  ((TMenuItem*)Sender)->Checked = true;
}
//---------------------------------------------------------------------------



void __fastcall TEditorsStylesDemoDemoMainForm::miNativeStyleClick(
      TObject *Sender)
{
  LookAndFeelController->NativeStyle = !LookAndFeelController->NativeStyle;
  ((TMenuItem*)Sender)->Checked = LookAndFeelController->NativeStyle;
}
//---------------------------------------------------------------------------

void __fastcall TEditorsStylesDemoDemoMainForm::miAboutClick(TObject *Sender)
{
  ShowAboutDemoForm();
}
//---------------------------------------------------------------------------

void __fastcall TEditorsStylesDemoDemoMainForm::miExitClick(TObject *Sender)
{
  Close();
}
//---------------------------------------------------------------------------

void __fastcall TEditorsStylesDemoDemoMainForm::UpdateFileNameStatusPanel(String AFileName)
{
  sbMain->Panels->Items[1]->Text = ExtractFileName(AFileName);
}
//---------------------------------------------------------------------------

void __fastcall TEditorsStylesDemoDemoMainForm::miFileOpenClick(TObject *Sender)
{
  ActiveFrame->OpenFile(this);
}
//---------------------------------------------------------------------------

void __fastcall TEditorsStylesDemoDemoMainForm::miFileSaveClick(TObject *Sender)
{
  ActiveFrame->SaveFile(this);
}
//---------------------------------------------------------------------------

void __fastcall TEditorsStylesDemoDemoMainForm::PageControlChange(
      TObject *Sender)
{
  int APageIndex = PageControl->ActivePage->TabIndex;
  if (APageIndex != -1) {
  gbDescription->Caption = EditorsStylesDemoFrameManager()->Frames[APageIndex]->Description();
  }
}
//---------------------------------------------------------------------------


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -