以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  目录树定位后底色  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=192064)

--  作者:allenyen
--  发布时间:2024/5/27 14:08:00
--  目录树定位后底色
图片点击可在新窗口打开查看
目前设置双击单据号后自动会定位至目录树上,但是这个底色看不清,可以自定义设置这个底色吗
定位代码如下
Dim tbl As Table = Tables("djss")
If Forms(_ParentForm).Opened Then
    Dim trv As WinForm.TreeView = Forms(_ParentForm).Controls("TreeView1")
    For Each nd As WinForm.TreeNode In trv.AllNodes
        If nd.fullpath.Contains(tbl.Current("单据编号"))
            trv.SelectedNode = nd
            Exit For
        End If
    Next
    
End If
e.Form.Close()

--  作者:有点蓝
--  发布时间:2024/5/27 14:23:00
--  
        If nd.fullpath.Contains(tbl.Current("单据编号"))
            trv.SelectedNode = nd
nd.BackColor = color.red
            Exit For
        End If

--  作者:allenyen
--  发布时间:2024/5/27 14:29:00
--  
这个要光标移出这个定位点才会显示  默认还是灰色
--  作者:有点蓝
--  发布时间:2024/5/27 14:32:00
--  
那没办法,建议使用文字颜色

nd.ForeColor = color.red

--  作者:allenyen
--  发布时间:2024/5/27 14:35:00
--  
以下是引用有点蓝在2024/5/27 14:32:00的发言:
那没办法,建议使用文字颜色

nd.ForeColor = color.red


这个也是一样的 我都试过了  都会默认显示为原始色(灰色)  都要手动把光标移动到别的地方点一下 才能生效


--  作者:有点蓝
--  发布时间:2024/5/27 14:37:00
--  
有点麻烦,参考:http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=80401&skin=0