Drop a TLIstBox (name: ListBox1) on a Delphi form (name: Form1) and handle the OnMouseMove event as:
procedure TForm1.ListBox1MouseMove (Sender: TObject; Shift: TShiftState; X, Y: Integer) ;
var lstIndex : Integer ;
begin
with ListBox1 do
begin
lstIndex:=SendMessage(Handle, LB_ITEMFROMPOINT, 0, MakeLParam(x,y)) ;
if (lstIndex >= 0) and (lstIndex <= Items.Count) then
Hint := Items[lstIndex]
else
Hint := ''
end;
end;
end.
Delphi tips navigator:
» Add a Check Box to a standard dialog box
« Copying group of files - standard animation dialog
