Hi all,
also notice that the default text entry widget has already an autocompletion 
feature.
see WidgetExamples>>exampleTextEntryWithCompletionDialog
You can find several uses of it. See 
EditorFindReplaceDialogWindow>>newFindTextEntryMorph as another example.
Cheers
Alain


-----
exampleTextEntryWithCompletionDialog
        "self new exampleTextEntryWithCompletionDialog"
        | applicants entryCompletion |
        applicants := (Array
                                streamContents: [:strm | Symbol
                                                allSymbolTablesDo: [:each | 
(each notEmpty
                                                                        and: 
[each first canBeGlobalVarInitial
                                                                                
        and: [Smalltalk globals includesKey: each]])
                                                                ifTrue: [strm 
nextPut: each]]]) sort.
        entryCompletion := EntryCompletion new
                                dataSourceBlock: [:currText | applicants];
                                
                                filterBlock: [:currApplicant :currText | 
currText size > 3
                                                and: [currApplicant asUppercase 
includesSubstring: currText asString asUppercase]].
        UIManager default
                request: 'Enter a class name fragment (at least 4 characters)'
                initialAnswer: ''
                title: 'Text entry with completion example: simple find a class'
                entryCompletion: entryCompletion
-----

Le 30 sept. 2013 à 15:06, Benjamin <[email protected]> a 
écrit :

> You may have a look at the Spotlight widget Esteban made.
> It's mainly a text area with auto completion
> 
> Ben
> 
> On Sep 30, 2013, at 2:18 PM, Norbert Hartl <[email protected]> wrote:
> 
>> I like to make myself a little command shell inside the image. For this I 
>> would need a textfield that can popup somewhere on the screen and that has 
>> enough hooks for text entry events and hooks/support for auto-completion.
>> 
>> What would be the best things to read/the best code to look at in order to 
>> learn how I can accomplish that.
>> 
>> thanks,
>> 
>> Norbert
>> 
>> 
> 


Reply via email to