Board index » delphi » Getting the item under the cursor in a TListView. HELP!

Getting the item under the cursor in a TListView. HELP!

Hi all! I'm using a TListView in the report mode: I have several rows, with
an icon and some subitems on each. I'm trying to know in which item the
cursor's at (not the selected
item). I'm using GetItemAt, but it seems not to work when the cursor is over
a subitem which
needs the ListView to be scrolled to be reached. In this case, GetItemAt
returns nil. I also tried
with GetNearestItem and with GetHitTest, but no way. Any nice idea? Thanks a
lot in advance.
 

Re:Getting the item under the cursor in a TListView. HELP!


Set ListView.RowSelect to True and use GetItemAt.

"Andrs RM" <andres...@ole.com> schreef in bericht
news:8ja1r6$8pu$1@lola.ctv.es...

Quote
> Hi all! I'm using a TListView in the report mode: I have several rows,
with
> an icon and some subitems on each. I'm trying to know in which item the
> cursor's at (not the selected
> item). I'm using GetItemAt, but it seems not to work when the cursor is
over
> a subitem which
> needs the ListView to be scrolled to be reached. In this case, GetItemAt
> returns nil. I also tried
> with GetNearestItem and with GetHitTest, but no way. Any nice idea? Thanks
a
> lot in advance.

Other Threads