本站首页    管理页面    写新日志    退出


«November 2025»
1
2345678
9101112131415
16171819202122
23242526272829
30


公告
================

注会练习软件
http://www.cpasoft.com.cn
我的注会软件官网

http://blog.163.com/abc7105@126/

 

 


哈哈,热爱快“过气”的DELPHI


我的分类(专题)

日志更新

最新评论

留言板

链接

Blog信息
blog名称:注册会计师(注会)练习软件
日志总数:398
评论数量:116
留言数量:27
访问次数:3278631
建立时间:2005年6月6日




[delpih编程]advstringgrid 底部的foote显示求和结果
软件技术

吕向阳 发表于 2010/4/7 8:51:56

  With   the   floating   footer   (for   which   the   settings   are   organised   in   the   property   grid.FloatingFooter)   an   always   visible   fixed   footer   can   be   displayed   in   the   grid.   The   floating   footer   can   currently   be   organised   in   3   different   ways   set   by   the   FooterStyle   property   :         fsFixedLastRow     fsColumnPreview       fsCustomPreview     ----------------     In   this   sample   application,   the   fsFixedLastRow   style   is   choosen   and   the   last   row   is   used   to   display   the   column   sums.   The   following   method   puts   the   column   sums   into   the   last   row:           procedure   TForm1.UpdateSums;     var         i:   Integer;     begin         for   i   :=   1   to   AdvStringGrid1.ColCount   -   1   do             AdvStringGrid1.Floats[i,AdvStringGrid1.RowCount   -   1]   :=                 AdvStringGrid1.ColumnSum(i,1,AdvStringGrid1.RowCount   -   2);         AdvStringGrid1.FloatingFooter.Invalidate;       end;     --------------------------------------------     To   synchronise   updating   the   floating   footer   whenever   a   cell   value   changes   through   editing,   the   UpdateSums   method   is   called   from   the   OnCellValidate   event   which   is   triggered   whenever   editing   changes   a   cell.           procedure   TForm1.AdvStringGrid1CellValidate(Sender:   TObject;   Col,     Row:   Integer;   var   Value:   String;   var   Valid:   Boolean);     begin         UpdateSums;     end;     -------------------------------------


阅读全文(1503) | 回复(0) | 编辑 | 精华
 



发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)



站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 2.043 second(s), page refreshed 144796877 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号