thomy2010 发表于 2010-8-13 10:30:54

expand问题

为什么只能展开3个节点,请高手解答.
With window("text:=HP QuickTest Professional Tutorial").wintreeview("nativeclass:=Systreeview32")
'a=.getItemsCount
'msgbox a
For k=0 to.GetItemsCount
      .expand k
Next
End With

TIB 发表于 2010-8-14 19:34:29

Dim A
A = Array(5)
Set TreeView = Window("HP QuickTest Professional").WinTreeView("SysTreeView32")
ReDim A(TreeView.GetItemsCount)
For I = 0 to TreeView.GetItemsCount - 1
        a(I)= TreeView.GetItem(I)
Next

For I = 0 to Ubound(a) - 1
        TreeView.Expand a(I)
Next

thomy2010 发表于 2010-8-16 09:51:31

谢谢!能告诉我为什么吗?呵呵...必须用数组吗?而且数组还得redim一次
页: [1]
查看完整版本: expand问题