Groups | Blog | Home
all groups > dotnet windows forms > august 2003 >

dotnet windows forms : Tooltip for listview subitems


Al
8/17/2003 11:27:02 PM
Hi!
How can I add tooltip for subitems of listview when text
Bob Powell [MVP]
8/18/2003 11:16:39 PM
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


[quoted text, click to view]

tho192 NO[at]SPAM web.de
8/19/2003 1:57:05 AM
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

[quoted text, click to view]
AddThis Social Bookmark Button