以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]目录树上光标移动时,目录树闪动  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=151462)

--  作者:miaoqingqing
--  发布时间:2020/6/23 17:48:00
--  [求助]目录树上光标移动时,目录树闪动
目录树上光标移动,背景色显示代码加上了,但是光标移动过程中目录树闪烁

static pnd As object
Dim tree As System.windows.Forms.treeview = e.sender.basecontrol
Dim x As Integer = System.Windows.Forms.Cursor.Current.Position.X
Dim y As Integer = System.Windows.Forms.Cursor.Current.Position.Y
Dim pt = tree.PointToClient(new Point(X, Y))  \'取当前坐标
Dim nd As System.Windows.Forms.TreeNode = tree.GetNodeAt(pt) \'取坐标所在位置的节点
If nd Is Nothing OrElse pnd Is Nothing OrElse pnd.name <> nd.name Then
    For Each nnd As WinForm.TreeNode In e.Sender.AllNodes
        nnd.BackColor = color.white  \'选中节点背景色
        nnd.ForeColor = color.blue  \'选中节点字体色
    Next
    
    If nd IsNot Nothing
        nd.BackColor = color.PeachPuff   \'鼠标移动在未选中节点上的背景色
        nd.ForeColor = color.blue  \'鼠标移动在未选中节点上的字体颜色
    End If
End If
pnd = nd
,求助
怎样设置,光标在目录树上移动,目录树不闪烁

是否窗口打开后生成目录树,下面代码和排序代码冲突?
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
trv.BuildTree("中国", "省市项目名称|考核板块|成果状态|设计类别")

Tables("中国").Sort = "设计类别,省市项目名称,片区负责人,项目负责人,正式成果名称"

[此贴子已经被作者于2020/6/23 18:03:09编辑过]

--  作者:有点蓝
--  发布时间:2020/6/23 19:56:00
--  
这种本来就是要不停的刷新,没有办法的
--  作者:miaoqingqing
--  发布时间:2020/6/24 9:20:00
--  回复:(有点蓝)这种本来就是要不停的刷新,没有办法...
目录树上移动时,光标设置显示特殊图标怎么设置呢?
--  作者:有点蓝
--  发布时间:2020/6/24 9:27:00
--  

[此贴子已经被作者于2020/6/24 9:27:25编辑过]