Problem with TAdvListBox and GetItemAtXY

Hello!

I'm trying to show individual hints for each ListBoxItem using following code:

procedure TfLohnabrechnung.LB_LAR_MAListMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);

var
   tmpItem :TListBoxItem;

begin

   tmpItem := LB_LAR_MA.GetItemAtXY(X,Y);


   LB_LAR_MA.ShowHint := False;

   if tmpItem = nil
    then LB_LAR_MA.Hint := 'bitte Mitarbeiter auswählen'
    else LB_LAR_MA.Hint := tmpItem.Text;

   LB_LAR_MA.ShowHint := True;

end;

The problem: The function returns everytime the first item of the listbox (Index0), so the hint shows always the text of Item[0].

Could someone please help me?

DELPHI XE5 Enterprise

TMS ComponentPack 7.4.1.0

AdvListBox-Version: 1.1.2.0 

Does this mean that LB_LAR_MA.GetItemAtXY(X,Y); always returns item 0 ?

Yes!

I also still tried it directly with SendMessage(Handle, LB_ITEMFROMPOINT,0, MakeLParam(X,Y));

Resulting Index: always 0 ... whether the mouse was over an item or not ...

I see that Handle you use must be wrong. This is a compound component and the internal listbox handle should be used. This isn't exposed right now. We'd need to extend the component to expose this.