tkinter 文本行间距

tkinter text line spacing

有没有办法稍微增加 tkinter 文本小部件中的行间距?

我想space我的文本,例如,1.2 * 字体大小,以便用户可以调整以提高可读性。

spacing1、spacing2 和 spacing3 参数似乎依赖于平台,在 Windows 上不受支持,并且仅支持整行。

您可以按如下方式配置间距(以像素为单位):

text.config(spacing1=10)    # Spacing above the first line in a block of text
text.config(spacing2=10)    # Spacing between the lines in a block of text
text.config(spacing3=10)    # Spacing after the last line in a block of text

适用于 Python win10 3.6.5。或者您有无效代码的示例吗?