implements:
authorClaus Gittinger <cg@exept.de>
Sat, 19 Jun 1999 17:41:25 +0200
changeset 1417 3d331ae2d2b6
parent 1416 505ef8832a06
child 1418 32a6131b304b
implements: wantsFocusWithPointerEnter
ListModelView.st
--- a/ListModelView.st	Sat Jun 19 12:23:36 1999 +0200
+++ b/ListModelView.st	Sat Jun 19 17:41:25 1999 +0200
@@ -695,11 +695,12 @@
     super keyPress:aKey x:x y:y
 !
 
-wantsFocusWithButtonPress
-    "catch the keyboard focus on button click
-    "
-    ^  true
+pointerEnter:state x:x y:y
+    "mouse pointer entered - request the keyboard focus (sometimes)"
 
+    self wantsFocusWithPointerEnter ifTrue:[
+        self requestFocus.
+    ].
 
 ! !
 
@@ -729,6 +730,25 @@
 
 ! !
 
+!ListModelView methodsFor:'focus handling'!
+
+wantsFocusWithButtonPress
+    "catch the keyboard focus on button click
+    "
+    ^  true
+
+
+!
+
+wantsFocusWithPointerEnter
+    "views which like to take the keyboard focus
+     when the pointer enters can do so by redefining this
+     to return true"
+
+    ^ true
+
+! !
+
 !ListModelView methodsFor:'initialize / release'!
 
 create
@@ -1212,6 +1232,6 @@
 !ListModelView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/ListModelView.st,v 1.5 1999-06-12 14:37:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ListModelView.st,v 1.6 1999-06-19 15:41:25 cg Exp $'
 ! !
 ListModelView initialize!