以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  TopicLink 循环遍历  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=191409)

--  作者:puma
--  发布时间:2024/4/15 12:59:00
--  TopicLink 循环遍历
需求:单击某个导航的时候,添加一个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

--  作者:有点蓝
--  发布时间:2024/4/15 13:34:00
--  
    For Each  tpl As WinForm.TopicLink In page .Links
        tpl.ImageFile =nothing
    Next

--  作者:puma
--  发布时间:2024/4/15 13:52:00
--  
感谢!蓝板,已成功实现。贴下我的代码


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"