Tag: 列表框

我如何编程添加TListBoxItem内的图像?

问题 很长一段时间,我使用自定义样式来加载详细的TListBox 。 它基本上是一个带有TImage作为图标的ListBox 。 不过最近我遇到了很多的错误,并决定把它扔掉。 这是我如何编程生成我的TListBox项目: // Create LISTBox Item lb_item := TListBoxItem.Create(self); lb_item.Parent := lb_awesome_list; lb_item.Text := cow_name; 如果我想添加一个Image呢? 我到目前为止所做的 我试图把它作为一个ItemData添加 lb_item.ItemData.Bitmap := iv_user_ic.Bitmap; 还有一些其他的select没有成功。 有没有可能以编程方式添加图像?