[Tkinter-discuss] Automagically calling functions

Batista, Facundo FBatista at uniFON.com.ar
Wed Apr 21 12:38:28 EDT 2004


I'm using Radiobutton:

rb_var = IntVar()
Radiobutton(master, text="foo", variable=rb_var, value=1, command=function1)
Radiobutton(master, text="bar", variable=rb_var, value=2, command=function2)

So, the user chooses whatever he/she wants and Radiobutton automatically
calls the corresponding function.

But then, when creating the dialog again, I read the config and want to put
the Radiobutton in the same state the user left it. So, I do:

rb_var.set(previous_state)

The issue is that this last step don't automatically call the corresponding
function.

I want Radiobutton to trigger function1 if I do rb_var.set(1), for exmaple.
There's a way?

Thank you!

.	Facundo



More information about the Tkinter-discuss mailing list