Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tkinter Set Thickness of Separator

I am using ttk's Separator objects to create horizontal dividers in my application.

separator = ttk.Separator(frame, orient='horizontal')
separator.pack(side='top', fill='x', padx=10)

However, every separator is the same thickness/weight - about 2-3 pixels.

Is it possible to create a thicker separator?

Thanks.

like image 766
Manby Avatar asked Oct 19 '25 03:10

Manby


1 Answers

I have been made aware that a Frame is a good option here instead of a Separator.

I created a frame with the following code:

separator2 = tk.Frame(frame, bd=10, relief='sunken', height=4)
separator2.pack(side='top', fill='x')

Here is a comparison between a ttk Separator and my Frame: enter image description here

Thanks to acw1668 and TheLizzard for the comments which suggested this.

like image 103
Manby Avatar answered Oct 21 '25 18:10

Manby



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!