--- a/EditFieldWithCompletion.st Wed Feb 05 20:08:36 2014 +0100
+++ b/EditFieldWithCompletion.st Wed Feb 05 20:08:38 2014 +0100
@@ -316,7 +316,7 @@
ifNone:[ best ]
].
options isSortedCollection ifFalse:[
- options := options asSortedCollection:[:a :b | a asString < b asString ]
+ options := options asSortedCollection:[:a :b | a displayString < b displayString ]
].
self sensor
pushUserEvent:#completion:options:
@@ -325,9 +325,9 @@
"Created: / 26-07-2009 / 17:45:09 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified: / 09-08-2009 / 02:51:44 / Jan Vrany <vranyj1@fel.cvut.cz>"
- "Modified: / 09-02-2010 / 20:46:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 18-11-2011 / 14:33:56 / cg"
"Modified (format): / 20-11-2011 / 09:42:25 / cg"
+ "Modified: / 20-04-2012 / 18:20:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
hideOptionsWindow
@@ -343,6 +343,8 @@
showOptionsWindow
+ | x y w |
+
showOptions ifFalse:[^ self].
optionsWindow notNil ifTrue:[ ^ self ].
@@ -360,14 +362,19 @@
highlightMode: #line;
font:self font;
backgroundColor:self backgroundColor;
- delegate: self.
+ delegate: self;
+ yourself.
+
+ x := self absoluteLeft + 5" - optionsView textStartLeft".
+ y := self absoluteTop + self height + 1 + 5.
+ w := (width * 2) + 0"((optionsView textStartLeft) * 2)".
optionsWindow := StandardSystemView new
bePopUpView;
beSlave;
- origin:(self absoluteLeft + 5" - optionsView textStartLeft")
- @ (self absoluteTop + self height + 1 + 5)
- extent:(width + 0"((optionsView textStartLeft) * 2)") @ (fontHeight * 10).
+ origin:x @ y
+ extent:(w min: (Screen current width - x)) @ (fontHeight * 10);
+ yourself.
ScrollableView
forView:optionsView
@@ -384,8 +391,8 @@
"Created: / 09-08-2009 / 08:12:21 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified: / 09-08-2009 / 09:28:47 / Jan Vrany <vranyj1@fel.cvut.cz>"
- "Modified: / 09-12-2010 / 22:05:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 29-11-2011 / 11:27:13 / cg"
+ "Modified: / 04-04-2012 / 13:08:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
startCompletion
@@ -399,10 +406,10 @@
!EditFieldWithCompletion class methodsFor:'documentation'!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/EditFieldWithCompletion.st,v 1.7 2013-02-04 17:51:47 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/EditFieldWithCompletion.st,v 1.8 2014-02-05 19:08:38 cg Exp $'
!
version_SVN
- ^ '§Id: EditFieldWithCompletion.st 7662 2010-12-09 21:05:19Z vranyj1 §'
+ ^ '$Id: EditFieldWithCompletion.st,v 1.8 2014-02-05 19:08:38 cg Exp $'
! !