2 sets of radiobuttons - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: 2 sets of radiobuttons (/thread-22802.html) |
2 sets of radiobuttons - Chuck_Norwich - Nov-27-2019 Hi, have looked ont web, but I can't seem to find a definite answer. Have a pair of radio buttons: rad_lt = Radiobutton(root,text='Lighting circuit',value=1) rad_nonlt = Radiobutton(root,text='Non-lighting circuit',value=2) rad_lt.grid(column=1,row=4) rad_nonlt.grid(column=2,row=4) Works fine. I want to add a separate set of radio buttons, completely separate from above. If I give them values of 3 and 4, then you can only choose one of the 4 radiobuttons. I want to be able to choose 1 from each set. Pointers? What don't I know? Thanks RE: 2 sets of radiobuttons - Denni - Nov-27-2019 Okay what are you using ?? TKinter, WxPython, PySide2, PyQt ??? RE: 2 sets of radiobuttons - Chuck_Norwich - Nov-27-2019 Ok. Yes, missing info. Tkinter RE: 2 sets of radiobuttons - woooee - Nov-27-2019 Quote:I want to be able to choose 1 from each setThe reason you use a radiobutton is that you want one, and only one. selection. You will have to have the user choose one from group "A" and then delete these and present group "B". It would be more straight forward to use chechbuttons and when the selection is finished. check that one, and only one, but is selected from group "A" and one from "B". RE: 2 sets of radiobuttons - Denni - Dec-02-2019 I do not know TKinter but Qt has a means of grouping radio buttons such that you have Group1 and Group2 and etc... I would assume TKinter has something similar-ish |