From: Alex Garipidis
> thanks again for your answer :). Unfortunately I get the same error
> message with the "+1c"... "Bad text > index +1c".
Alex, the following coder works for me under Python 2.5 under Windows XP:
from Tkinter import *
root = Tk()
tw = Text(root)
tw.insert(END, "The @cat sat on the mat.")
tw.pack()
root.update()
pos=tw.search("@", "1.0")
end = tw.search("\W", pos + "+1c", regexp=True)
print pos, end
If it fails on your setup, what version of Python do you have? What
Platform?
Mick
--
View this message in context:
http://www.nabble.com/How-can-I-edit-a-string-inside-a-textbox--tp14271911p14273355.html
Sent from the Python - tkinter-discuss mailing list archive at Nabble.com.
_______________________________________________
Tkinter-discuss mailing list
[email protected]
http://mail.python.org/mailman/listinfo/tkinter-discuss