Problem
For a long time, I was using a Custom Style to load a detailed TListBox
.
It's basically a ListBox
with a TImage
as an icon.
However recently I've been encountering lots of bugs and decided to throw it all away.
This is how I generate my TListBox
items programatically:
// Create LISTBox Item
lb_item := TListBoxItem.Create(self);
lb_item.Parent := lb_awesome_list;
lb_item.Text := cow_name;
What if I would like to add an Image
to it?
What I have done so far
I've tried to add it as an ItemData
lb_item.ItemData.Bitmap := iv_user_ic.Bitmap;
And a few other options without success. Is it possible to add an image programatically?