在ListCtrl中放置一个按钮

编程入门 行业动态 更新时间:2024-10-27 02:20:39
在ListCtrl中放置一个按钮 - wxPython(Place a Button in 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多久更新一次他网站上的主要邮编

我还没有使用该控件,但它的演示非常令人印象深刻。

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.

更多推荐

本文发布于:2023-07-21 23:17:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1214867.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:按钮   ListCtrl

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!