擅长:python、mysql、java
<p>默认字体对字符使用的宽度不相等。例如,请尝试(假设您在Windows上):</p>
<pre><code>listbox = Listbox(master, width=60, font='consolas')
</code></pre>
<p>结果如下:</p>
<p><a href="https://i.stack.imgur.com/oMkqf.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oMkqf.jpg" alt="TKinter window using Consolas, with equal spacing"/></a></p>