如何增加调色剂列表框中行之间的间距 - python [英] how to increase spacing between rows in tinter listbox - python

查看:49
本文介绍了如何增加调色剂列表框中行之间的间距 - python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 tkinter 列表框初始化如下:

I have a tkinter listbox initialised as follows:

self.serives_listbox = tk.Listbox(parent, font=("TkTextFont", 20), exportselection=False, width=30, height = 15)
self.serives_listbox.grid(column=0, row=1, padx=5, pady=10)

然后我将项目添加到列表框中,如下所示:

I then add items to the listbox like this:

for key, value in service_list[str(self.category_combox.get())].items():
    self.serives_listbox.insert(tk.END, str(key))

我需要一种方法来增加 lisbox 行之间的间距

I need a way to increase the spacing between the rows of the lisbox

谢谢

推荐答案

除了插入空白项之外,没有办法更改 tkinter 列表框中的项之间的间距.

There is no way to change the spacing between items in a tkinter listbox, other than to insert blank items.

这篇关于如何增加调色剂列表框中行之间的间距 - python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆