我正在使用一个树视图,其中我有许多父节点和子节点.. 在树视图 keydown 事件中,我使用以下代码在给出 keydown 和 keyup 时选择下一个节点
Private Sub Treeview1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Treeview1.KeyDown
If e.KeyCode = Keys.Up Then
Treeview1.Select()
ElseIf e.KeyCode = Keys.Down Then
Treeview1.Select()
End If
End Sub
( Treeview1.Select()
) Now when the selection reaches the very first node, I want to focus previous control of treeview, but I can't check the selected node is first node of treeview. 谁能帮我找到。