Tkinter Radio button on the second window

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Fri Sep 5 05:16:18 CEST 2008


En Thu, 04 Sep 2008 22:01:25 -0300, Dream <god1124 at gmail.com> escribi�:

> The code create 2 windows. 2 radiobuttons are put on the second
> window. A control variable "v" is binded to the 2 widgets.
> But when I run the code, I found the control variable not binded
> succsessfully: The second radiobutton was not selected by default;
> Click ed each button always print 1. I don't know what is wrong. So I
> need help.Thanks.
>
> from Tkinter import *
> window1=Tk()
> window2=Tk()

Don't create more than one root Tk instance. Weird things happen, like  
this.
If you need another, separate window, use a Toplevel widget.

-- 
Gabriel Genellina




More information about the Python-list mailing list