Tooltip for listview subitems

  • Thread starter Thread starter Al
  • Start date Start date
Tooltips can only be applied to controls, not listbox items.

If you're interested in a commercial solution I sell a tooltip control that
can be used just about anywhere.

Check out my xRay Tools BubbleTooltip control on my site.

--
Bob Powell [MVP]
C#, System.Drawing

ANNOUNCING: Well Formed.
The monthy electronic magazine for
Windows Forms and GDI+ engineers
http://www.bobpowell.net/wellformed.htm

Check out the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm
 
Hi Al,

I made it like this:

Private Sub listView_MouseMove(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles listView.MouseMove
Dim lvi As ListViewItem
Dim loc As Point

lvi = listView.GetItemAt(e.X, e.Y)
If lvi Is Nothing OrElse lvi.Tag.trim = "" Then
tooltip.RemoveAll()
Else
tooltip.SetToolTip(listView, lvi.Tag)
End If
End Sub

I stored the text for the tooltip of the istViewItem in the .Tag
property before.

Thomas
 
Back
Top