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

Alex Garipidis n3atione at hotmail.com
Thu Dec 6 03:07:51 CET 2007


//This was originally posted on the python-win32 mailing list where it clearly didn't belong... Sorry for the inconvenience, I hope I did it right this time! Hello everybody,
 
I have a Tkinter Textbox in my application. I want to scan the textbox for a symbol, defined by me as a "mark", and change the word that is inside or next to that symbol.
 
This is what i mean:
 
If a user types this to the textbox:
 
"Hello @everybody, how are you doing?"
 
I want to scan this string for the "@" character (or something else) and edit the word next to it (or "inside" it, e.g. "@everybody@"), "everybody" in this case, and make it have a color for example or make it underlined. 
 
I suspect that the answer is in the tag methods of Textbox but so far I haven't found an answer yet. Maybe I'm looking in the wrong direction :)
 
Thank you all
_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tkinter-discuss/attachments/20071206/eb9adb54/attachment.htm 


More information about the Tkinter-discuss mailing list