需求:单击某个导航的时候,添加一个logo。
方法:先清除所有的logo。在指定的行添加
问题:TopicLink 怎么循环遍历,清除下top的logo。
Dim tpb As WinForm.TopicBar = Forms("导航").Controls("TopicBar1")
For Each page As WinForm.TopicPage In tpb.Pages
msgbox(page.Name)
'For Each tpl As WinForm.TopicLink In pages.TopicLink
'msgbox("tpl.name")
'Next
'If page.Name <> e.Page.Name Then
'page.Collapsed = True
'End If
Next
For Each tpl As WinForm.TopicLink In page .Links
tpl.ImageFile =nothing
Next
感谢!蓝板,已成功实现。贴下我的代码
Dim pageName As String = args(0)
Dim linkName As String = args(1)
Dim tpb As WinForm.TopicBar = Forms("导航").Controls("TopicBar1")
For Each page As WinForm.TopicPage In tpb.Pages
For Each tpl As WinForm.TopicLink In page .Links
tpl.ImageFile =Nothing
Next
Next
Dim tl As WinForm.TopicLink
tl = Forms("导航").Controls("TopicBar1").Pages(pageName).Links(linkName)
tl.ImageFile = "右箭头.png"