#NEWLINE# def triggeredcomplete( self ) : #NEWLINE# #INDENT# 'triggeredcomplete the Entry, delta may be 0/1 to cycle through possible hits' #NEWLINE# if self . cycle : #NEWLINE# #INDENT# self . delete ( self . position , tk . END ) #NEWLINE# self . _hit_index += 1 #NEWLINE# if ( self . _hit_index == len ( self . _hits ) ) : #NEWLINE# #INDENT# self . _hit_index = 0 #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . position = len ( self . get ( ) ) #NEWLINE# wstartsc = self . get ( ) . rfind ( ':' ) #NEWLINE# wstartsp = self . get ( ) . rfind ( ' ' ) #NEWLINE# if ( ( wstartsc < 0 ) and ( wstartsp < 0 ) ) : #NEWLINE# #INDENT# self . wstart = 0 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( wstartsc > wstartsp ) : #NEWLINE# #INDENT# self . wstart = ( wstartsc + 1 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . wstart = ( wstartsp + 1 ) #NEWLINE# #UNINDENT# #UNINDENT# _hits = [ ] #NEWLINE# for element in self . _completion_list : #NEWLINE# #INDENT# if ( self . case_sensitive == 0 ) : #NEWLINE# #INDENT# if element . lower ( ) . startswith ( self . get ( ) [ self . wstart : ] . lower ( ) ) : #NEWLINE# #INDENT# _hits . append ( element ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if element . startswith ( self . get ( ) [ self . wstart : ] ) : #NEWLINE# #INDENT# _hits . append ( element ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# self . _hit_index = 0 #NEWLINE# self . _hits = _hits #NEWLINE# #UNINDENT# if self . _hits : #NEWLINE# #INDENT# self . delete ( self . wstart , tk . END ) #NEWLINE# self . insert ( self . wstart , self . _hits [ self . _hit_index ] ) #NEWLINE# self . select_range ( wstartsp . position , tk . END )