Bottom Page

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
Quote
#2
Okay what are you using ?? TKinter, WxPython, PySide2, PyQt ???
Quote
#3
Ok. Yes, missing info.
Tkinter
Quote
#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".
Quote
#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
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  [Tkinter] Default Values for radiobuttons xuraax 2 166 May-17-2020, 06:43 PM
Last Post: xuraax
  [Tkinter] Connect Toplevel Radiobuttons to root Label/Entry widgets iconit 2 212 Apr-28-2020, 06:50 AM
Last Post: iconit

Forum Jump:


Users browsing this thread: 1 Guest(s)