How to bind self events in Tkinter Text widget after it will binded by Text widget?
问题 I want to bind self events after Text widget class bindings, in order to change the text of the widget when my binding function is called. My binding, for example self.text.bind("<Key>", self.callback) , is called before the content in Text widget changes. 回答1: What is happening in your case is that your binding to print the value happens before the class binding, and it's the class binding that actually takes user input and puts it in the widget. There are several ways to solve this problem.