Dim s As String = "年|35|月|35|日|35|字号|35|凭证号|35|摘要|300|[其它]|合计|60"
Dim ct As WinForm.Table = e.Form.Controls("Table1")
Dim t As Table = ct.Table
Dim str As String
Dim w2 As Integer = (ct.Width - 35*5-300-60) / (t .cols.Count-7)
if w2 > 0 then
For Each c As Col In .Cols
str = str & "|" & c.name & "|" & w2
next
s = s.replace("[其它]",str.trim("|"))
t.SetColVisibleWidth(s)
end if