Tkinter 设置分隔符的厚度
Tkinter Set Thickness of Separator
我正在使用 ttk 的 Separator
对象在我的应用程序中创建水平分隔线。
separator = ttk.Separator(frame, orient='horizontal')
separator.pack(side='top', fill='x', padx=10)
但是,每个分隔符都是相同的 thickness/weight - 大约 2-3 个像素。
是否可以创建更厚的分隔符?
谢谢。
我知道 Frame
是一个不错的选择,而不是 Separator
。
我使用以下代码创建了一个框架:
separator2 = tk.Frame(frame, bd=10, relief='sunken', height=4)
separator2.pack(side='top', fill='x')
这是 ttk Separator
和我的 Frame
之间的比较:
感谢 acw1668 和 TheLizzard 提出建议的评论。
我正在使用 ttk 的 Separator
对象在我的应用程序中创建水平分隔线。
separator = ttk.Separator(frame, orient='horizontal')
separator.pack(side='top', fill='x', padx=10)
但是,每个分隔符都是相同的 thickness/weight - 大约 2-3 个像素。
是否可以创建更厚的分隔符?
谢谢。
我知道 Frame
是一个不错的选择,而不是 Separator
。
我使用以下代码创建了一个框架:
separator2 = tk.Frame(frame, bd=10, relief='sunken', height=4)
separator2.pack(side='top', fill='x')
这是 ttk Separator
和我的 Frame
之间的比较:
感谢 acw1668 和 TheLizzard 提出建议的评论。