[Tkinter-discuss] (no subject)

Vasilis Vlachoudis Vasilis.Vlachoudis at cern.ch
Mon Dec 20 15:05:33 CET 2010


Dear all,

the default behavior of the Entry/Text on how they react to Cut&Paste is a bit problematic (at least on linux)
Imaging that the entry contains the text "foobar" with the first 3 letters "foo" highlighted and we have the word "test" copied previously on the clipboard. When we press Ctrl-V to paste the clipboard text "test", tk will not delete the "foo" before inserting the "test" and we will get the text "footestbar" with the "foo" still highlighted. (The "test" will be inserted at the location of the cursor)

Normally what the user will expect will be to delete first the "foo" and then insert the "test" getting the string "testbar" with the "test" highlighted.

Do you know how I can change the behavior without the need to override the default Entry class and substitute it in the whole project?

Vasilis Vlachoudis
Dep EN, CERN
CH-1211 GENEVA 23
SWITZERLAND

Phone:  +41-22 767 9851
GSM:    +41-76 487 4378
Fax:    +41-22 766 9644

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20101220/3d819c02/attachment.html>


More information about the Tkinter-discuss mailing list