以文本方式查看主题

-  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=191257)

--  作者:洮沙
--  发布时间:2024/4/7 9:41:00
--  [求助]如何调整窗口文件管理器文件顺序?
如何调整窗口文件管理器文件顺序?

图片点击可在新窗口打开查看此主题相关图片如下:微信截图_20240407093849.png
图片点击可在新窗口打开查看
麻烦老师帮忙解决一下,谢谢!

--  作者:有点蓝
--  发布时间:2024/4/7 9:51:00
--  
方法1、删除掉,重新按顺序添加
2、取文件列集合,按需要的顺序重新更改集合:http://www.foxtable.com/webhelp/topics/2717.htm

--  作者:洮沙
--  发布时间:2024/4/7 12:32:00
--  
已解决,上移代码:
Dim pv As WinForm.FileManager = e.Form.Controls("FileManager1")
Dim fl As String = pv.SelectedItem
If fl > "" Then
    Dim dr As DataRow = Tables("日常业务").Current.DataRow
    Dim fls As List(Of String)
    fls = dr.Lines("申报资料")
    Dim n1 As Integer = fls.Indexof(fl)
    If n1 > 0 Then
        fls.Remove(fl)
        fls.Insert(n1 - 1, fl) \'向上插入值
        dr.Lines("申报资料") = fls
        pv.SelectedItem = fl
        dr.Save()
    Else
        Messagebox.Show("已是最上一条!", "提示") 
    End If     
Else
    Messagebox.Show("未选择文件!", "提示") 
End If



下移代码:
Dim pv As WinForm.FileManager = e.Form.Controls("FileManager1")
Dim fl As String = pv.SelectedItem
If fl > "" Then
    Dim dr As DataRow = Tables("日常业务").Current.DataRow
    Dim fls As List(Of String)
    fls = dr.Lines("申报资料")
    Dim n1 As Integer = fls.Indexof(fl)
    If n1 < fls.Count - 1 Then
        fls.Remove(fl)
        fls.Insert(n1 + 1, fl) \'向下插入值
        dr.Lines("申报资料") = fls
        pv.SelectedItem = fl
        dr.Save()
    Else
        Messagebox.Show("已是最后一条!", "提示") 
    End If 
Else
    Messagebox.Show("未选择文件!", "提示") 
End If
[此贴子已经被作者于2024/4/7 12:50:46编辑过]