簡體   English   中英

tkinter 文本行間距

[英]tkinter text line spacing

有沒有辦法稍微增加 tkinter 文本小部件中的行間距?

我想將我的文本間隔為 1.2 * 字體大小,以使用戶能夠調整可讀性。

間距 1、間距 2 和間距 3 參數似乎與平台相關,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

在 win10 上的 Python 3.6.5 上為我工作。 或者你有非工作代碼的例子嗎?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM