473,498 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Adding A Tooltip To A ListView Item

Is it possible to add tooltip to a listview item?

Thanks,
Dino
Nov 20 '05 #1
1 3057
* Dino Buljubasic <di**@noplacelikehome.com> scripsit:
Is it possible to add tooltip to a listview item?


Set the items' 'Tag' property to the tooltip text and add a ToolTip
component to the form. Then add this code:

\\\
Private m_HoveredItem As ListViewItem

Private Sub ListView1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseMove
Dim lvi As ListViewItem = Me.ListView1.GetItemAt(e.X, e.Y)
If Not lvi Is m_HoveredItem Then
m_HoveredItem = lvi
If lvi Is Nothing Then
Me.ToolTip1.SetToolTip(Me.ListView1, "")
Else
Me.ToolTip1.SetToolTip(Me.ListView1, lvi.Tag)
End If
End If
End Sub
///

The code is untested, but it should basically work. If you find any
problems with the code, please let me know.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
5254
by: Sue | last post by:
On code-behind page: (attributes set programatically for each of these elements) linkbutton added to tablecell textbox added to tablecell tablecells added to tablerow tablerow added to table...
1
2196
by: tor | last post by:
Hi If a column in a listview isn't wide enough to show the whole content you can place the cursor on that item and you will get a tooltip?? box where you can see the whole content of that item. ...
3
2532
by: Craig G | last post by:
what way do you code it? i tried the following but it wouldnt display it lblAdd_info is a hidden field in the cell itself that contains the data i want to display in the tooltip text. i added the...
2
13739
by: Ken | last post by:
Hi all, Please help! I'm attempting to apply tooltips to each individual item in VB.Net's Listview control. In VB6 it was easy - you just did the following (assumes "myListView" is the name of...
4
1895
by: Rado | last post by:
Hello. I´ve got one problem. I take on form one listview and one tooltip. I can in listview properties write something to tooltip. But I want change this text during program running. I want...
2
1880
by: Amjad | last post by:
Hi, How do I display a tooltip when mouse hovers on top of an item of a ListView? I want the tooltip to contain the text of the item the mouse is pointing at. Amjad
0
1354
by: Lucky | last post by:
hi guys, i'm looking for a soultion that helps me to show the subitem text of the listview control in the tooltip when the mouse pointer hovers on the subitem. i've found on solution, according to...
1
7818
by: piercy | last post by:
Hi, ive been trying to produce something using a listview control which shows error messages for the emails sent from my application. Its a wierd concept so im going to try explain it best i can. I...
1
2679
by: Brandon Arnold | last post by:
I have a listview set in detail view and a number of columns. I want, after a specified amount of time, for a tooltip to popup with whatever text. Problem is, after I set the tooltip to the...
0
7205
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4910
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4590
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
291
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.