Re: Center ttk.Checkbox in grid column

2019-06-08 Thread Rich Shepard
On Sat, 8 Jun 2019, Terry Reedy wrote: This is supposed to be the default. I managed to get them right-justified somehow, but the following works for me on Windows to get two centered widgets. import tkinter as tk from tkinter import ttk r = tk.Tk() c1 = ttk.Checkbutton(r, text='box1') c2 = ttk

Re: Center ttk.Checkbox in grid column

2019-06-08 Thread Terry Reedy
On 6/8/2019 12:32 PM, Rich Shepard wrote: Is there a way to center the entire widget within the grid column? This is supposed to be the default. I managed to get them right-justified somehow, but the following works for me on Windows to get two centered widgets. import tkinter as tk from

Re: Center ttk.Checkbox in grid column

2019-06-08 Thread Rich Shepard
On Sat, 8 Jun 2019, MRAB wrote: A workaround is to pack the widget in a tk.Frame and then put the frame in the grid cell. Okay. For now I'll leave it as-is and wait for feedback from users (if any) when the application is up and running. Thanks again, Rich -- https://mail.python.org/mailman/

Re: Center ttk.Checkbox in grid column

2019-06-08 Thread MRAB
On 2019-06-08 20:01, Rich Shepard wrote: On Sat, 8 Jun 2019, MRAB wrote: In answer to your question, widgets are centred by default; you have to tell it if you _don't_ want a widget centred horizontally or centred vertically. That's what I thought but the little box and button label don't loo

Re: Center ttk.Checkbox in grid column

2019-06-08 Thread Rich Shepard
On Sat, 8 Jun 2019, MRAB wrote: In answer to your question, widgets are centred by default; you have to tell it if you _don't_ want a widget centred horizontally or centred vertically. That's what I thought but the little box and button label don't look centered but left justified. Thanks, R

Re: Center ttk.Checkbox in grid column

2019-06-08 Thread MRAB
On 2019-06-08 18:37, Rich Shepard wrote: On Sat, 8 Jun 2019, Rich Shepard wrote: A data input form (screenshot attached) has two ttk.Checkbutton widgets. Looks like the screenshot image was clipped off the message. Is there a widget option for the ttk.Checkbox that horizontally and vertically

Re: Center ttk.Checkbox in grid column

2019-06-08 Thread Rich Shepard
On Sat, 8 Jun 2019, Rich Shepard wrote: A data input form (screenshot attached) has two ttk.Checkbutton widgets. Looks like the screenshot image was clipped off the message. Is there a widget option for the ttk.Checkbox that horizontally and vertically centers the button and label text in the