Reputation: 821
I would like to arrange my Radiobuttons horizontally and centered on my Frame such as this example:
But I have only been able to do this:
And this is my code :
self.mit.grid(row=4, column=0)
self.gpl2.grid(row=4, column=1)
self.gpl3.grid(row=4, column=2)
Upvotes: 1
Views: 3482
Reputation: 20679
It looks like there is a widget in the 0 column which is wider than the other widgets. Try setting a new frame as the parent of the group of radio buttons:
radiogroup = Frame(master)
# self.mit = Radiobutton(radiogroup, ...)
# ...
self.mit.grid(row=0, column=0)
self.gpl2.grid(row=0, column=1)
self.gpl3.grid(row=0, column=2)
radiogroup.grid(row=4, column=0)
Upvotes: 1