Dim tv As WinForm.TreeView = e.Form.Controls("TreeView1")
tv.Nodes.Clear
For Each o As object In ContextMenus("Cell").Items
If tv.Nodes.Contains(o.Name) = False Then
tv.Nodes.Add(o.Name)
End If
Dim pi As System.Reflection.PropertyInfo = ContextMenus("Cell").Items(o.name).Gettype().GetProperty("Items")
If pi IsNot Nothing Then
For Each ob As object In ContextMenus("Cell").Items(o.name).Items
If tv.Nodes(o.name).Nodes.Contains(ob.name) = False Then
tv.Nodes(o.name).Nodes.Add(ob.Name)
End If
Next
End If
Next
如果想遍历右键菜单下的所有下级菜单应该怎么调整一下呢