How to add icon with listbox item


#1

hi guys. i want add icon with each listbox item。i search forum but not find solution.
i want add a image componet into ListBoxRow Component。but i don’t think it is a good idea.
anybody can help me

thanks


#2

You’d need to write a custom listbox row component for that - not too hard to do, and you can draw anything you want in it. Can’t remember whether the demo app has an example, but I’m sure there’ll be something about doing that in the forum.


#3

thanks for your reply.

I check listbox model source code that can’t custom listbox row component。override ListBoxModel::paintListBoxItem() paint my icon.

of course, write a custom listbox row component can do more interesting things.

thanks again. :smiley: