[Tkinter-discuss] How can I edit a string inside a textbox?

Fredrik Lundh fredrik at pythonware.com
Thu Dec 6 22:42:53 CET 2007


Alex Garipidis wrote:

> Thank you for your answer. I am experiencing some problems with the code 
> you suggested. The
>  
> end = text.search("\W", pos + " 1 char", regexp=True)
> 
> gives me this as a result: TclError: bad text index " 1 char".

oops, transcription error.  try:

     end = text.search("\W", pos + " + 1c", regexp=True)

or just

     end = text.search("\W", pos + "+1c", regexp=True)

</F>



More information about the Tkinter-discuss mailing list