hi,
The following code is the find function part of your code but with part of the solution
it now prints the index (location) of the begining of a string or letter but i havn't a clue how to highlight text.
def find():
findStr = tkSimpleDialog.askstring("Find", "Find:") # Prompts user to enter a string, if nothing is entered, function returns None
if findStr: # Test to see if the function returned a string or None
print findStr
start = 1.0
while 1:
position = text.search(findStr, start, stopindex=END)
if not position:
break
print "string was found at ", position
start = position + "+1c"
else:
print 'nothing was entered'
the text widget uses index's, 1.0 would mean the first row (1) and the first column (0)
just picture the text widget as a grid, with one character in each square
so when you enter a string to search, it returns either nothing (if nothing was found) or the index for the first character in the string.
at the end of the while loop, the "+1c" means +1 column.
www.pythonware.com has documentation for all of Tkinter