如何在 ultimatelistctrl 的行中插入图像(wxPython)

How to insert images in rows of ultimatelistctrl (wxPython)

ULC demo我看了好久,比较复杂。 有人可以告诉我如何向每一行添加图像吗? 谢谢。

和wxPython Classic一样wx.ListCtrl:

listCtrl.InsertImageStringItem(row_index, label, imageId)

https://wxpython.org/Phoenix/docs/html/wx.lib.agw.ultimatelistctrl.UltimateListCtrl.html#wx.lib.agw.ultimatelistctrl.UltimateListCtrl.InsertImageStringItem

其中 imageId 是您之前分配给 ULC 的 wx.ImageList 中的图像索引。