Place a Button in ListCtrl - wxPython

家住魔仙堡 提交于 2020-01-23 09:45:12

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/3595913/place-a-button-in-listctrl-wxpython

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!