Tooltip for listview subitems

B

Bob Powell [MVP]

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
 
T

Thomas Schupp

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top