or
Dim sNode As RadTreeNode = tv.SelectedNode
If sNode Is Nothing Then
tv.SelectedNode = tv.FirstVisibleNode
Exit Sub
End If
Dim nextVisible = sNode.NextVisibleNode
Dim vb As Integer
If nextVisible IsNot Nothing Then
tv.SelectedNode = nextVisible
vb = tv.ClientRectangle.Y - tv.ScrollPosition.Y + tv.ClientRectangle.Height
If nextVisible.Bounds.Bottom > vb Then
tv.ScrollBy(-1)
End If
tv.Nodes.Move(sNode.Index, nextVisible.Index)
ElseIf sNode.Index = tv.Nodes.Count - 1 Then
nextVisible = tv.Nodes(0)
tv.SelectedNode = nextVisible
vb = tv.ClientRectangle.Y - tv.ScrollPosition.Y + tv.ClientRectangle.Height
If nextVisible.Bounds.Bottom > vb Then
tv.ScrollBy(-1)
End If
tv.Nodes.Move(sNode.Index, nextVisible.Index)
tv.BringIntoView(sNode)
End If
sNode.Selected = True