在我的应用程序中,我有一个 ListBox 包含很长的短项目列表。我想在每页上展示尽可能多的项目,我希望 ListBox 显示不止一列。
我查看了文档,没有找到任何描述 ListBox 和 Columns 容器组合的内容。那有可能吗?还是我走错路了?
尝试这个。
text1 = urwid.Text("text1", 'center')
text2 = urwid.Text("text2", 'center')
text3 = urwid.Text("text3", 'center')
childs = urwid.Columns([('fixed', 10, text1), ('fixed', 10, text2), ('fixed', 10, text3)], )
menuList = urwid.SimpleListWalker([childs])
lb = urwid.ListBox(menuList)