comment/format in:
authorStefan Vogel <sv@exept.de>
Thu, 04 Aug 2011 16:25:07 +0200
changeset 10445 70c71811bd97
parent 10444 702c7ef1f1bc
child 10446 989b09bd6d3f
comment/format in: #initialize #keyPress:x:y: changed: #showOptionsWindow Allow double click on selctionList entry
EditFieldWithCompletion.st
--- a/EditFieldWithCompletion.st	Thu Aug 04 16:07:32 2011 +0200
+++ b/EditFieldWithCompletion.st	Thu Aug 04 16:25:07 2011 +0200
@@ -237,14 +237,11 @@
 keyPress:key x:x y:y 
 
     "Forward certain events to optionsView if any"
-
-
     
     (optionsView notNil and:
         [(#( #CursorDown #CursorUp ) includes:key)]) 
             ifTrue:[^ optionsView keyPress:key x:x y:y].
 
-
     key = #Accept ifTrue:[self hideOptionsWindow].
     key = #Return ifTrue:[self hideOptionsWindow].
     key = #Escape ifTrue:[self hideOptionsWindow].
@@ -345,6 +342,11 @@
                     textStartLeft: textStartLeft - 2;
                     listHolder: optionsHolder;
                     action:[:value | self contents:value asString ];
+                    doubleClickAction:[:index | 
+                            self contents:(optionsView at:index) asString.
+                            self hideOptionsWindow.
+                            self accept
+                        ];
                     useIndex: false;
                     " JV: Looks good to me "
                     highlightMode: #line;
@@ -388,7 +390,7 @@
 !EditFieldWithCompletion class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/EditFieldWithCompletion.st,v 1.2 2011-08-04 09:49:57 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/EditFieldWithCompletion.st,v 1.3 2011-08-04 14:25:07 stefan Exp $'
 !
 
 version_SVN