說明: Ls_ObjectList中獲得的是一個所有datawindow中的所有控件名稱的字符串,以Tab分隔
ObjectInDw[]存放提取出的單獨的控件名,類型為string
Ls_ObjectList = dw.Object.DataWindow.Objects //獲取數據窗體的所有控件名稱的字符串,以Tab間隔。
x = 0
If Len(Ls_ObjectList)>0 then
Li_Pointer = Pos(Ls_ObjectList,"~t")
Do While Li_Pointer >0
x += 1
ObjectInDw[x]=Trim(Left(Ls_ObjectList, Li_Pointer - 1))
Ls_ObjectList = Trim(Right(Ls_ObjectList,Len(Ls_ObjectList) - Li_Pointer))
Li_Pointer =Pos(Ls_ObjectList,"~t")
Loop
x += 1
ObjectInDw[x]= Ls_ObjectList
end if
查看對應的屬性可以通過describe函數
dw_1.describe(ObjectInDw[i] + ".type")