Delphi FireMonkey TListBoxItem click event for "header" items


I want to track clicks on TListBoxItem that are created like this:

TmpListBoxItem := TListBoxGroupHeader.Create(myListBox);
TmpListBoxItem.StyleLookup := ‘listboxgroupheader’;
TmpListBoxItem.HitTest := True;

The following events do not trigger an an event…

ListBox OnMouseDown
ListBox OnItemClick
ListBoxItem OnClick

e.g. ListBox OnItemClick does fire when it is for normal items:

TmpListBoxItem := TListBoxItem.Create(lbCatalog);
TmpListBoxItem.StyleLookup := ‘listboxitembottomdetail’;

I need to get events for “header” items as well…

When clicking on header items – it seems to be the (in my case) TImage control behind the TListBox that gets the OnMousedown event. I am trying to research how this can be as I can not see any easy-to-spot place where handling for header items is different. Still searching.

Comments are closed.