wxPython:更新 wx.ListBox 列表 [英] wxPython: Update wx.ListBox list

查看:41
本文介绍了wxPython:更新 wx.ListBox 列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 python 程序中有一个 wx.ListBox,我不想在 wx.Timer 更新时更改其中的列表.我有计时器工作,我只是不知道如何更改它显示的列表.

I have a wx.ListBox in a python program, and I wan't to change out the list in it on a wx.Timer update. I have the timer working, I just don't know how to change out the list that it displays.

推荐答案

这是一个例子 用于修改 ListBox.一般使用ListBox的AppendClear方法.您可以在计时器处理程序中调用它们.

Here's an example for modifying a ListBox. Generally, it uses the Append and Clear methods of ListBox. You can call those in your timer handler.

由于ListBox派生自ItemContainer,查看更多item修改方法此处.

Since ListBox derives from ItemContainer, see more item modification methods here.

这篇关于wxPython:更新 wx.ListBox 列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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