#UI_ENHANCEMENT by cg
authorClaus Gittinger <cg@exept.de>
Wed, 04 May 2016 13:02:26 +0200
changeset 5699 1ebb2d421c0d
parent 5697 41f084492b81
child 5700 dcfece192331
#UI_ENHANCEMENT by cg class: ListSelectionBox added: #setupEditfieldToMoveToListOnCursorDown changed: #postRealize always setup so that cursor-down goes into the list (UI-convenience)
ListSelectionBox.st
--- a/ListSelectionBox.st	Tue May 03 13:24:28 2016 +0200
+++ b/ListSelectionBox.st	Wed May 04 13:02:26 2016 +0200
@@ -396,11 +396,28 @@
 
     super postRealize.
     self updateList.
-
+    self setupEditfieldToMoveToListOnCursorDown.
+    
     "Modified: 12.5.1996 / 21:50:50 / cg"
     "Created: 24.7.1997 / 18:22:19 / cg"
 !
 
+setupEditfieldToMoveToListOnCursorDown
+    self enterField 
+        onKey:#CursorDown 
+        leaveWith:[
+            |listView|
+
+            listView := self listView.
+            listView windowGroup focusView:listView byTab:true.
+            listView hasSelection ifFalse:[
+                listView selectFirst
+            ] ifTrue:[
+                listView selectNext
+            ].
+        ].
+!
+
 updateList
     "setup contents of list; 
      nothing done here but typically redefined in subclasses."