[Tutor] Python 3 and tkinter Radiobuttons

Kent Johnson kent37 at tds.net
Sun Oct 11 14:38:39 CEST 2009


On Sun, Oct 11, 2009 at 7:00 AM, Dave Angel <davea at ieee.org> wrote:
> bob smith wrote:
>>
>>                  Thanks for the reply. Unfortunately, even when I include
>> a variable, all of the buttons start out selected.

What version of Python 3 are you using? What platform? If you are not
using the latest version, try upgrading. My example works as shown
using Python 3.1 on Mac OSX. The initial state of the buttons is "all
off".

> I think Kent forgot to include the v.set(), to set the initial state of that
> group of radiobuttons.

Without the v.set() it starts with no button selected. With v.set() it
starts with one button selected. Either way it satisfies the OP's
requirement; which one is correct depends on his needs.

Kent


More information about the Tutor mailing list