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

📄 areacustomfunc.pas

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

interface

procedure RegisterCustomFunction;

implementation

uses cxExcelConst, cxSSFormulas;

procedure AreaFunc(Sender: TcxSSFunctionHandler);
  procedure AreaFuncCallBack(Sender: TcxSSFunctionHandler; const Value: Double);
  begin
    if Sender.CallBackIndex = 0 then
      Sender.FloatValue := Value
    else
      Sender.FloatValue := Sender.FloatValue * Value;
  end;
begin
  Sender.EnumParamValues(@AreaFuncCallBack, [vtFloat]);
  Sender.SetFloatResult(Sender.FloatValue);
end;

procedure RegisterCustomFunction;
const
  cxFuncDefinition: TcxFuncDefinition =
    (Token: $FFFF-1; Name: 'Area'; Definition: AreaFunc; Params: fpFixed; ParamsCount: 2);
begin
  TcxSSFunctionHandler.RegisterFunctions([cxFuncDefinition]);
end;

initialization

  RegisterCustomFunction;

end.

⌨️ 快捷键说明

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