int coldw[] = {5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}
//
int i,cnt
string conf
string dwname
datawindowchild dwc
conf = profilestring(gs_inifile,”w_cross_report”,”colconfig”,””)
if conf = “” then return
cnt = upperbound(coldw)
dw_1.getchild(“dw_1”,dwc)
dwc.setredraw(false)
for i = 1 to cnt
yield()
dwname = string(coldw[i],"00")
if pos(conf,dwname+"|")>0 then
//dwc.modify("#"+ string(coldw[i])+".visible = 1") //?????????执行前面几个还好,越往后面越慢。特别到13个后非常慢。或者崩溃。改用设置width总算暂时解决燃眉之急。不知道是不是:Rebuild columns at runtime这个勾选项引起的。因为design界面手工设置时也容易崩溃。后面有时间留个标记再试验。
dwc.modify("#"+ string(coldw[i])+".width = 300")
else
dwc.modify("#"+ string(coldw[i])+".visible = 0")
dwc.modify("#"+ string(coldw[i])+".width = 0")
end if
next
dwc.setredraw(true)