1,072
社区成员
发帖
与我相关
我的任务
分享
string ls_buf,ls_objName
// 隐藏所有对象
ls_buf = dw_1.Object.DataWindow.Objects
do
ls_objName = f_string_get_token(ls_buf, "~t")
if ls_objName <> "" then dw_1.Modify(ls_objName + ".Visible='0'")
loop while ls_buf <> ""
// 设置要计算的对象及细节带
dw_1.object.列名.y = 0
dw_1.object.列名.visible = true
dw_1.object.DataWindow.Detail.Height = 0
dw_1.object.DataWindow.Detail.Height.AutoSize = "yes"
messagebox('列名', dw_1.describe("Evaluate('RowHeight()', 1)"))
string f_string_get_token(ref string, string)
// 返回第一串字符,并把它从源字符串中删除
int p
string ret
p = Pos(source, separator) // Get the position of the separator
if p = 0 then // if no separator,
ret = source // return the whole source string and
source = "" // make the original source of zero length
else
ret = Mid(source, 1, p - 1) // otherwise, return just the token and
source = Right(source, Len(source) - p) // strip it & the separator
end if
return ret