tooltips in a listview

dynamic_sysop

Well-known member
Joined
Oct 1, 2002
Messages
1,039
Location
Ashby, Leicestershire.
hi does anyone know how to put a tooltip on a listview item? ive tried this...
Code:
       Dim tp As New ToolTip()
        With ListView1
            .Items.Add(TextBox1.Text)
            tp.SetToolTip(ListView1, .Text)
        End With
but it does nothing:-\ and theres no direct tooltip feature on the listview control by the look of it.
cheers
 
its ok i sussed it , my silly mistake:-\
Code:
       Dim tp As New ToolTip()

        With ListView1
            .Items.Add(TextBox1.Text)
            tp.SetToolTip(ListView1, TextBox1.Text)
        End With
    End Sub
was using .Text before ( as in the listitem ) but obviously that was blank.
 
The Tooltip can also be added to a form like any other control. It will show up in the yellowy part below the forms designer. Its an Extender control so it adds properties to ALL controls on your form. If your ToolTip object is called toolTip1 (the default), your controls (in the designer) will have a new property called "ToolTip on toolTip1". You can also use the toolTip1 object in code, just as you are (toolTip1.SetToolTip(ListView1, TextBox1.Text).

-Nerseus
 

Similar threads

Back
Top