Search code examples
delphilistboxlistboxitem

TListBoxItem.ItemData.Details doesn't work


My situation is illustrated/explained with this screenshot :

http://www.evolutiongraph.fr/chevereto/images/2015/02/11/Capture.jpg

In my ListBox, I want to display a text (titles), and details (articles) ; but it doesn't work : titles work perfectly, but ItemData.Details is not displayed, I don't know why :/ The variable desc is not empty, I've tested it. ItemData.Details still not appear.

Help me please :)


Solution

  • You need to modify the TListBoxItem's StyleLookup to one which supports showing details. For example, listboxitembottomdetail. Keep in mind this property is changed on an item-by-item basis, not necessarily the entire list. You can specify this to be the default item style (for all new items) by modifying TListBox.DefaultItemStyles.ItemStyle rather than each individual item.

    enter image description here