Tkinter: How To Align A Set Of Radio Buttons That Differs In Text Length
tech_radioButton1 = ttk.Radiobutton(selection_frame_1, text='ANT+', variable = self.tech_var, value = 1, command = self.tech_select) tech_radioButton1.pack(side = 'top') tech_radio
Solution 1:
never mind, I found it out. I should have done anchor = 'w' when packing. So something like:
tech_radioButton1 = ttk.Radiobutton(selection_frame_1, text="ANT+", variable = self.tech_var, value = 1, command = self.tech_select)
tech_radioButton1.pack(side = 'top', anchor = 'w')
tech_radioButton2 = ttk.Radiobutton(selection_frame_1, text="Bluetooth", variable = self.tech_var, value = 2, command = self.tech_select)
tech_radioButton2.pack(side = 'top', anchor = 'w')
tech_radioButton3 = ttk.Radiobutton(selection_frame_1, text="BTLE", variable = self.tech_var, value = 3, command = self.tech_select)
tech_radioButton3.pack(side = 'top', anchor = 'w')
tech_radioButton4 = ttk.Radiobutton(selection_frame_1, text="WLAN", variable = self.tech_var, value = 4, command = self.tech_select)
tech_radioButton4.pack(side = 'top', anchor = 'w')
tech_radioButton5 = ttk.Radiobutton(selection_frame_1, text="UNII", variable = self.tech_var, value = 5, command = self.tech_select)
tech_radioButton5.pack(side = 'top', anchor = 'w')
Post a Comment for "Tkinter: How To Align A Set Of Radio Buttons That Differs In Text Length"