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

📄 featurechild.cpp

📁 DevExpress公司出品的Borland Delphi和C++ Builder的控件(包含完整源代码)。 ExpressSpreadSheet:交叉数据表格控件。 一款Delphi
💻 CPP
字号:
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "FeatureChild.h"
#include "FeaturesDemoMain.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxControls"
#pragma link "cxSSheet"
#pragma resource "*.dfm"
TFeatureChildForm *FeatureChildForm;
//---------------------------------------------------------------------------
__fastcall TFeatureChildForm::TFeatureChildForm(TComponent* Owner)
  : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TFeatureChildForm::FormClose(TObject *Sender, TCloseAction &Action)
{
  if (Application->MainForm->MDIChildCount > 1){
    Application->MainForm->Next();
    Action = caFree;
  }
}
//---------------------------------------------------------------------------
void __fastcall TFeatureChildForm::SetSelection()
{
  if (cxSpreadSheetBook->OnSetSelection != NULL)
      cxSpreadSheetBook->OnSetSelection(cxSpreadSheetBook, cxSpreadSheetBook->ActiveSheet);
}


void __fastcall TFeatureChildForm::FormActivate(TObject *Sender)
{
  SetSelection();
}
//---------------------------------------------------------------------------

void __fastcall TFeatureChildForm::FormCreate(TObject *Sender)
{
  SetSelection();
}
//---------------------------------------------------------------------------

void __fastcall TFeatureChildForm::cxSpreadSheetBookSheetPopupMenu(TObject *Sender,
      int X, int Y)
{
  FeaturesMainForm->pmSheetPopup->Popup(X, Y);
}
//---------------------------------------------------------------------------


void __fastcall TFeatureChildForm::cxSpreadSheetBookEditing(
      TcxSSBookSheet *Sender, const int ACol, const int ARow,
      bool &CanEdit)
{
  FIsEditorMode = true;
}
//---------------------------------------------------------------------------

void __fastcall TFeatureChildForm::cxSpreadSheetBookEndEdit(
      TObject *Sender)
{
  FIsEditorMode = false;
}
//---------------------------------------------------------------------------


void __fastcall TFeatureChildForm::cxSpreadSheetBookContextPopup(
      TObject *Sender, TPoint &MousePos, bool &Handled)
{
  if ((MousePos.x == -1) && (MousePos.y == -1))
  {
    MousePos = this->ClientToScreen(Point(0, 0));
  }
  FeaturesMainForm->pmSheetPopup->Popup(MousePos.x, MousePos.y);
  Handled = true;
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

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