以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  afterload调用函数没效果  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=93035)

--  作者:bahamute
--  发布时间:2016/11/18 17:38:00
--  afterload调用函数没效果

写了一个窗口表数据居中函数

Dim e As object = args(0)
Dim tbbame =  args(1)
Dim t As Table
t=e.Form.Controls(tbbame).Table
If t. rows.count > 0 Then
    For Each c As Col In t.cols
        c.TextAlign = TextAlignEnum.Center
    Next
End If
Return Nothing

然后afterload调用函数,没有居中效果:
Functions.Execute("窗口表数据居中",e,"Table1")

但是这样可以:
dim t  as table = e.Form.Controls("Table1").Table
For Each c As Col In t.cols
    c.TextAlign = TextAlignEnum.Center
Next

什么原因?请指教。
[此贴子已经被作者于2016/11/18 17:39:30编辑过]

--  作者:有点蓝
--  发布时间:2016/11/18 17:48:00
--  
我测试没有问题。

删除项目里的bin目录,重启项目试试