是否可以使用wxPython在ListCtrl项目中放置一个按钮? 现在我有一个ListCtrl,其中包含文件名和大小的数据,我希望用户能够单击按钮,下载文件。 如果这不可能,有没有办法在ListCtrl中显示图像,然后使其可单击,以便我可以绑定一个动作?
Is is possible to place a button inside of a ListCtrl item with wxPython? Right now I have a ListCtrl that has data with a file name and size, and I want the user to be able to click a button, to download the file. If this isn't possible, is there a way to display an image in the ListCtrl, and then make it clickable so that I can bind an action to it?
最满意答案
不需要。您必须使用“ UltimateListControl ”,这是一种通用列表实现,可以将任何类型的小部件附加到行。 查看其演示文件以获取示例。 你可能最好抓住错误修正和其他更改的中继代码 - 我不确定Andrea多久更新一次他网站上的主要邮编
我还没有使用该控件,但它的演示非常令人印象深刻。
No. You will have to use "UltimateListControl", a generic list implementation that can attach any kind of widget to rows. Check its demo files for examples. You're probably best off grabbing the trunk code for bugfixes and other changes - I'm not sure how often Andrea updates the main zip on his site
I've yet to use the control, but its demo is very impressive.
更多推荐
发布评论