OSDN Git Service

投稿欄でのリストスクロールにおいて正しく移動できないバグを修正
authorsyo68k <syo68k@users.sourceforge.jp>
Tue, 10 Aug 2010 11:39:08 +0000 (11:39 +0000)
committerKimura Youichi <kim.upsilon@bucyou.net>
Sat, 18 Feb 2012 14:14:40 +0000 (23:14 +0900)
git-svn-id: http://svn.sourceforge.jp/svnroot/tween/trunk@694 e39ad16e-3079-482e-bb30-4b4d378143b6

Tween/Tween.vb

index e64aff3..0a1ce37 100644 (file)
@@ -5402,12 +5402,22 @@ RETRY:
             If e.KeyCode = Keys.Up Then
                 e.Handled = True
                 e.SuppressKeyPress = True
-                GoPost(False)
+                Dim idx As Integer = 0
+                If _curList IsNot Nothing AndAlso _curList.SelectedIndices(0) > 0 Then
+                    idx = _curList.SelectedIndices(0) - 1
+                    SelectListItem(_curList, idx)
+                    _curList.EnsureVisible(idx)
+                End If
             End If
             If e.KeyCode = Keys.Down Then
                 e.Handled = True
                 e.SuppressKeyPress = True
-                GoPost(True)
+                Dim idx As Integer = 0
+                If _curList IsNot Nothing AndAlso _curList.SelectedIndices(0) < _curList.Items.Count - 1 Then
+                    idx = _curList.SelectedIndices(0) + 1
+                    SelectListItem(_curList, idx)
+                    _curList.EnsureVisible(idx)
+                End If
             End If
         End If
         Me.StatusText_TextChanged(Nothing, Nothing)