Re: Cursor Index From Tkinter.Text in <KeyRelease> Gives Insconsistent Column, Test Case

Michael Lange <[email protected]>
Newsgroups gmane.comp.python.tkinter
Message-ID <[email protected]>
Hi,

On Fri, 12 Sep 2014 05:32:33 +0200
[email protected] wrote:

(...)
> TEST ONE
> 
>         Type this string slowly: 'one two three'
>         Press F1 to see each word undo.
> 
>     Result: Works fine. (For me atleast. Ephasis: type slowly.)
> 
> TEST TWO
> 
>         Type the same string as fast as you can: 'one two three'
>         Press F1 to see each word undo.
> 
(...)
> from Tkinter import *
> 
> class TextView(Text):
> 
>     def __init__(self, root):
>         Text.__init__(self, root)
> 
>         self.history = History(self)
>         self.bind("<KeyRelease>", self.keyRelease)
> 
>         # used to capture a char at a time in keyRelease.  If space
> char is pressed it , self.word)
> 
> if __name__ == "__main__":
>     root = Tk()
>     root.geometry("400x200+0+0")
> 
>     textView = TextView(root)
>     textView.pack()
>     root.bind("<F1>", textView.undo)
>     root.bind("<F2>", textView.redo)
> 
>     root.mainloop()

Looks like there is something missing here :-)
Could you please post a short but complete code example that exhibits the
problem?

Regards

Michael

.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

Peace was the way.
		-- Kirk, "The City on the Edge of Forever", stardate
                   unknown
_______________________________________________
Tkinter-discuss mailing list
[email protected]
https://mail.python.org/mailman/listinfo/tkinter-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.