2010-06-28 23 views

Répondre

2

Pour le mécanisme d'annulation, vérifiez le UndoDelegator.py de Idle en combinaison avec EditorWindow.py.

Pour sélectionner le contenu d'un widget, vous pouvez faire:

# remove previous selection, if any 
text_widget.tag_remove(Tkinter.SEL, "1.0", Tkinter.END) 
# select all 
text_widget.tag_add(Tkinter.SEL, "1.0", Tkinter.END) 
# place cursor 
text_widget.mark_set(Tkinter.INSERT, Tkinter.END) 
+0

Impressionnant, merci! – rectangletangle