Tkinter.Radiobutton question

Eric Brunel eric.brunel at pragmadev.com
Mon Jan 7 15:35:04 CET 2002


Svein Brekke wrote:

> When reading the state variable in the '<ButtonRelease-1>' callback
> from a Radiobutton widget, I always get the old variable value, not
> the new one.

Don't do that. To have a method called when the user clicks the button, use 
the "command" option of the Radiobutton; do not bind events to it. With the 
"command" option, when reading the variable associated with the button, you 
always get the new value.

HTH
 - eb -



More information about the Python-list mailing list