In pseudo-code it would be something like this assuming a class format (ignoring case for now)
def __init__(self):
self.orig_list=[ "Original", "words", "you", "want", "to", "test"]
self.new_list = orig_list[:] ## first pass - to be used by test_list
def compare_when_text_changed():
test_list=self.new_list[:]
self.new_list=[]
for word in test_list:
if word.startswith(self.entered_in_qt_edit_box):
self.new_list.append(word)
## self.new_list now contains the words that match so far
## update list box from self.new_list
## not necessary to return anything since self. is used.
I thought that someone would have posted code to do this, but coding this could become so funky that no one wants to put it out there on the internet I guess.
Last edited by woooee; Aug 29th, 2008 at 9:33 pm.
Reputation Points: 741
Solved Threads: 692
Nearly a Posting Maven
Offline 2,305 posts
since Dec 2006