Setting ToolTip for selected ListViewItem

kobezt08
01-11-2005, 12:37 AM
How do I set different tooltip message for different selected Listviewitems?
My ListView is in Detail mode and FullRowSelect = true

AtmaWeapon
01-11-2005, 12:20 PM
So far the only way I've found is to handle the ListView.MouseMove event. From within the handler, I use ListView.GetItemAt() to determine what item the mouse is over. Then, I use ToolTipProvider.SetToolTip to change the tooltip for the control on the fly.

The only real problem with it is just a UI issue that bugs me. The ToolTip displays immediately; I wish there was some way I could reset it so it would appear again after the delay. You can make it stop displaying, but then the mouse must be moved off of the control and back on again for it to reappear. The MouseHover event only fires if the mouse was outside of the control and moved inside, so it doesn't fire as you hover over different items. I had a thing set up with timers that halfway worked but I was cramped for time and had to scrap it.

piggybank1974
01-11-2005, 03:19 PM
try the Mouse Over event that will fire every time you move the mouse, but you would need a delay of some sort, because the refresh would go bananas.

the pig...

kobezt08
01-11-2005, 05:46 PM
So far the only way I've found is to handle the ListView.MouseMove event. From within the handler, I use ListView.GetItemAt() to determine what item the mouse is over. Then, I use ToolTipProvider.SetToolTip to change the tooltip for the control on the fly.

The only real problem with it is just a UI issue that bugs me. The ToolTip displays immediately; I wish there was some way I could reset it so it would appear again after the delay. You can make it stop displaying, but then the mouse must be moved off of the control and back on again for it to reappear. The MouseHover event only fires if the mouse was outside of the control and moved inside, so it doesn't fire as you hover over different items. I had a thing set up with timers that halfway worked but I was cramped for time and had to scrap it.


hmm... i tried
Private Sub lstvReport_MouseMove(ByVal sender As System.Object, ByVal e As System.EventHandler) Handles lstvReport.MouseMove
but it say that they do lstvReport_MouseMove & lstvreport.MouseMove does not have the same signature

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum