tk/tkinter radiobutton in grid bug?

Edward K. Ream edream at tds.net
Sat Jul 13 20:41:08 EDT 2002


> This _seems_ to work do you have an example that does not?

Not anymore.  I got rid of the radio buttons, as well as the grids :-)

Thanks for this reply.  My example had grids within grids, and mixed the
packer into the soup.  So it may not have deserved to work...

Edward
 
> import Tkinter
> root=Tkinter.Tk()
> variable=Tkinter.StringVar()
> l=Tkinter.Label(root, text='On or Off?').grid(row=0, col=0)
> rb1=Tkinter. Radiobutton(root, variable=variable, value='On', text='On')
> rb1.grid(row=0, col=1)
> rb2=Tkinter. Radiobutton(root, variable=variable, value='Off', text='Off')
> rb2.grid(row=0, col=2)
> rb2.select()
> 
> root.mainloop()
--------------------------------------------------------------------
Edward K. Ream   email:  edream at tds.net
Leo: Literate Editor with Outlines
Leo: http://personalpages.tds.net/~edream/front.html
--------------------------------------------------------------------



More information about the Python-list mailing list