How to configure the state of a Pmw RadioSelect checkbutton?
The add()
method returns the component widget. This mean you can modify this line:
chk.add(str(i))
To:
my_checkbutton = chk.add(str(i))
Put this in mind. Now to use a my_checkbutton
, you must create a Tkinter variable my_var = IntVar()
because if you want to inspect the state of my_checkbutton
, query my_var
.
If this is not clear to you, I can provide you my sample program. which screenshot is above: