This is an unofficial mirror of Tkinter reference documentation (based on Python 2.7 and Tk 8.5) created by the late John Shipman.
It was last updated in 2013 and is unmaintained. [More info]
To give an instance name to a specific widget in your
application, set that widget's name
option
to a string containing the name.
Here's an example of an instance name. Suppose you are
creating several buttons in an application, and you want
one of the buttons to have an instance name of panicButton
. Your call to the constructor might
look like this:
self.panic = tk.Button(self, name='panicButton', text='Panic', ...)