() 试算平衡表和帐户设置窗体的的事件处理代码如下 //以下为试算平衡表的事件处理代码 private { Private declarations } //统计计算是否平衡 procedure sumtable(); public { Public declarations } //当使用后结帐时所调用的函数 procedure foruse(); //初始化帐本时使用 procedure forinitial(); end; var SumAccount: TSumAccount; implementation uses MainForm; {$R *dfm} procedure TSumAccountFormClose(Sender: TObject; var Action: TCloseAction); begin action:=cafree; end; //设置窗体宽度和过滤条件 procedure TSumAccountDataSourceDataChange(Sender: TObject; Field: TField); begin //设置过滤条件 datasourceDataSetFilter:=本期发生借方<> OR 本期发生贷方<> OR 期初借方<> OR 期初贷方<> OR 期末借方<> OR 期末贷方<>; datasourceDataSetFiltered:=true; //设置表的列宽 dbgridColumns[]Width:=; dbgridColumns[]Width:=; dbgridColumns[]Width:=; dbgridColumns[]Width:=; dbgridColumns[]Width:=; dbgridColumns[]Width:=; dbgridColumns[]Width:=; dbgridColumns[]Width:=; end; //初始化表的设置 procedure TSumAccountFormShow(Sender: TObject); begin //设置表格表头显示与宽度 stringgridCells[]:=是否平衡; stringgridCells[]:=期初借方; stringgridCells[]:=期初贷方; stringgridCells[]:=本期发生借方; stringgridCells[]:=本期发生贷方; stringgridCells[]:=期末借方; stringgridCells[]:=期末贷方; stringgridCells[]:=合计; stringgridColWidths[]:=; stringgridColWidths[]:=; stringgridColWidths[]:=; stringgridColWidths[]:=; stringgridColWidths[]:=; stringgridColWidths[]:=; stringgridColWidths[]:=; stringgridColWidths[]:=; stringgridRowHeights[]:=; stringgridRowHeights[]:=; end; [] [] [] [] [] |