Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DISPLAY LISTVIEW COLUMN ON MOUSE_MOVE 1

Status
Not open for further replies.

Hackster

Programmer
Mar 28, 2001
173
US
I have a listview control with the view set to lvwReport. I want to display the contents of a description field in my database dependant on what item in the first column of my listview control the mouse is hovering over. The mouse_move event will contain an SQL pass through query that will return the description field as a recordset member. My question is how do I capture the text of the listview column during a mouse_move?

 
That sounds like a bad idea. What's wrong with using the click event?
 
I agree with eldnaH . . . do you know how often mouse move is called when the mouse is moving? And do you know how many times you will be running you SQL against your database while the ouse is moving? Take a look at the click event or if you have to use mouse move, then at least cache the information first. - Jeff Marler B-)
 
If I was talking about displaying a description field as a tooltip against a back end like a MS SQL Server or Oracle database I agree that it would be criminally incompetent to even think of such a thing, much less actually try and do it. However, this is not the case.

I'm developing, on my own time, an application that allows itself to be individually tailored by each user, and uses a MS Access database located on the local PC. At most, the table containing the descriptions would have no more than 50 to 75 records in it. I'm already doing on a ListBox control exactly what I want to do with the ListView control, and it works magnificently.
 
I have done this previously with the listview and found that you do not need the mouse move event. The listview control has the hoverselection property and when set you do not have to trigger a mousemove event. I can give you some code for that if you do not get it right.

PK Odendaal
pko@mweb.co.za

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top