以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  窗口状态栏可以合计选中数据吗?  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=132196)

--  作者:tuohai
--  发布时间:2019/3/16 11:45:00
--  窗口状态栏可以合计选中数据吗?
老师请问在窗口状态栏可以显示选中的多个单元格的数值合计吗?
--  作者:有点蓝
--  发布时间:2019/3/16 11:53:00
--  
到AfterSelRangeChange事件遍历选中的单元格然后合计即可:http://www.foxtable.com/webhelp/scr/0647.htm
--  作者:tuohai
--  发布时间:2019/3/18 10:57:00
--  
老师,我指的是在窗口模式下,而不是 StatusBar.Message3
--  作者:有点甜
--  发布时间:2019/3/18 11:37:00
--  

参考,编写systemIdle事件,窗口里显示,最后就改成 forms("窗口1").controls("Textbox1").text = str1

 

Dim str1 As String = ""
Dim t As Table = CurrentTable
Str1 = Str1 & "计数:" & t.Aggregate(AggregateEnum.Count, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "累计:" & t.Aggregate(AggregateEnum.Sum, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "平均:" & t.Aggregate(AggregateEnum.Average, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "最大:" & t.Aggregate(AggregateEnum.Max, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "最小:" & t.Aggregate(AggregateEnum.Min, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
\'Str1 = Str1 & "标准差:" & t.Aggregate(AggregateEnum.Std, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
\'Str1 = Str1 & "总体标准差:" & t.Aggregate(AggregateEnum.StdPop, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
\'Str1 = Str1 & "方差:" & t.Aggregate(AggregateEnum.Var, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
\'Str1 = Str1 & "总体方差:" & t.Aggregate(AggregateEnum.VarPop, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
StatusBar.Message3 = str1

--  作者:tuohai
--  发布时间:2019/4/4 12:51:00
--  
显示在 窗口  状态栏   累计 标签上怎么写,谢谢老师。
图片点击可在新窗口打开查看此主题相关图片如下:微信图片_20190404125000.png
图片点击可在新窗口打开查看

--  作者:有点甜
--  发布时间:2019/4/4 13:07:00
--  
StatusBar.Message3 = str1

 

改成

 

If forms("窗口1").opened then

    forms("窗口1").strips("状态栏").items("累计").text = str1

End If