Jump to content
Xtreme .Net Talk

Recommended Posts

  • Leaders
Posted

hi does anyone know how to put a tooltip on a listview item? i've tried this...

      Dim tp As New ToolTip()
       With ListView1
           .Items.Add(TextBox1.Text)
           tp.SetToolTip(ListView1, .Text)
       End With

but it does nothing:-\ and there's no direct tooltip feature on the listview control by the look of it.

cheers

  • Leaders
Posted

someone must know how to add a tooltip to an item in a listview:-\

in vb6 i'd just tell it to set the listview.listitems(i).tooltiptext

but there's no mention of tooltips in .net

  • Leaders
Posted

it's ok i sussed it , my silly mistake:-\

      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.

  • *Experts*
Posted

The Tooltip can also be added to a form like any other control. It will show up in the yellowy part below the form's designer. It's 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

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...