在 ListCtrl 中放置一个按钮 - wxPython [英] Place a Button in ListCtrl - wxPython

查看:50
本文介绍了在 ListCtrl 中放置一个按钮 - wxPython的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用 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 多久更新他网站上的主 zip

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.

这篇关于在 ListCtrl 中放置一个按钮 - wxPython的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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