以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]替换问题  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=53757)

--  作者:xokxiao
--  发布时间:2014/7/14 23:26:00
--  [求助]替换问题

我用Replace(OldValue, NewValue)把路径去掉,老是搞不好,请指点

 

If e.Sender.Name = "GSP认证" Then
    Dim Arr() As String={ ProjectPath &"制度",ProjectPath &"表格"}
    \'取运行目录
   
    e.Sender.Items.clear
    For i As Byte=0 To 1
        butt & arr(i) &"\\"

        MenuButton = New RibbonMenu.MenuButton(buttonname)
        MenuButton.Text="(" & arr(i) & ")"      替换成制度、表格

        MenuButton.ToolTip=buttonname
        e.Sender.Items.Add(MenuButton)
    Next
End If

[此贴子已经被作者于2014-7-14 23:29:42编辑过]

--  作者:Bin
--  发布时间:2014/7/15 8:33:00
--  
MenuButton.Text="(" & arr(i).replace(ProjectPath ,"") & ")"