wxPython – wx.TreeCtrl中的AssignImageList()方法
在这篇文章中,我们将学习与wxPython的wx.TreeCtrl类相关的AssignImageList()方法。AssignImageList()函数用于设置普通图像列表。通过该方法分配的图像列表将被wx.TreeCtrl自动删除(即它拥有该列表的所有权)。
AssignImageList()需要wx.ImageList参数。
语法: wx.TreeCtrl.AssignImageList(self, imageList)
参数
参数 | 输入类型 | 说明 |
---|---|---|
imageList | wx.ImageList | 要分配给Tree控件的图像列表。 |
代码示例 。
输出窗口 。