#NEWLINE# def MakeAutoCompleteTextBox( olv , columnIndex , maxObjectsToConsider = 10000 ) : #NEWLINE# #INDENT# '\n    Return a TextCtrl that lets the user choose from all existing values in this column.\n    Do not call for large lists\n    ' #NEWLINE# col = olv . columns [ columnIndex ] #NEWLINE# maxObjectsToConsider = min ( options , olv . GetItemCount ( ) ) #NEWLINE# options = set ( ( col . GetStringValue ( olv . GetObjectAt ( i ) ) for i in range ( maxObjectsToConsider ) ) ) #NEWLINE# tb = BaseCellTextEditor ( olv , columnIndex ) #NEWLINE# AutoCompleteHelper ( tb , list ( options ) ) #NEWLINE# return tb