Python Forum
2 sets of radiobuttons
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2 sets of radiobuttons
#1
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
Reply
#2
Okay what are you using ?? TKinter, WxPython, PySide2, PyQt ???
Reply
#3
Ok. Yes, missing info.
Tkinter
Reply
#4
Quote:I want to be able to choose 1 from each set
The 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".
Reply
#5
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Use radiobuttons to determine a total charge SalsaBeanDip 2 571 Nov-13-2020, 04:14 AM
Last Post: SalsaBeanDip
  [Tkinter] Default Values for radiobuttons xuraax 2 910 May-17-2020, 06:43 PM
Last Post: xuraax
  [Tkinter] Connect Toplevel Radiobuttons to root Label/Entry widgets iconit 2 948 Apr-28-2020, 06:50 AM
Last Post: iconit

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020