473,386 Members | 1,835 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Applying Tooltip to VB.Net Listview

Ken
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 the ListView
control):

set lst = myListView.ListItems.Add
lst.Text = "Test1"
lst.ToolTipText = "Test1 Label"

I can't work out the equivalent in the VB.Net Listview
control though. It seems that you have to add a Tooltip
control to the form, and then set which control it should
apply to, for example:

myToolTip.SetToolTip(myListView, "My Tooltip text")

However this only applies the tooltip to the whole
listview control, not the individual items.

Any help much appreciated!!

Cheers,

Ken
Nov 20 '05 #1
2 13729
After you have dropped a Tooltip control on your form, Each of your controls
on your form will be extended so you will have a Tooltip property where you
can enter your text in the designer.

Regards

Niclas

"Ken" <be******@hotmail.com> wrote in message
news:02****************************@phx.gbl...
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 the ListView
control):

set lst = myListView.ListItems.Add
lst.Text = "Test1"
lst.ToolTipText = "Test1 Label"

I can't work out the equivalent in the VB.Net Listview
control though. It seems that you have to add a Tooltip
control to the form, and then set which control it should
apply to, for example:

myToolTip.SetToolTip(myListView, "My Tooltip text")

However this only applies the tooltip to the whole
listview control, not the individual items.

Any help much appreciated!!

Cheers,

Ken

Nov 20 '05 #2
Thanks Niclas - but the new property only applies to the
whole control, not to the individual items that have been
added to my listview control.

I've since answered my own question though... Within the
listview's MouseMove event, I added the following code:
MyToolTip.SetToolTip(MyListView, MyListView.GetItemAt
(e.X, e.Y).Text)

This creates new tooltip every time the mouse moves over
each item inside the listview control.

Cheers,

Ken...
-----Original Message-----
After you have dropped a Tooltip control on your form, Each of your controlson your form will be extended so you will have a Tooltip property where youcan enter your text in the designer.

Regards

Niclas

"Ken" <be******@hotmail.com> wrote in message
news:02****************************@phx.gbl...
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 the ListView
control):

set lst = myListView.ListItems.Add
lst.Text = "Test1"
lst.ToolTipText = "Test1 Label"

I can't work out the equivalent in the VB.Net Listview
control though. It seems that you have to add a Tooltip
control to the form, and then set which control it should apply to, for example:

myToolTip.SetToolTip(myListView, "My Tooltip text")

However this only applies the tooltip to the whole
listview control, not the individual items.

Any help much appreciated!!

Cheers,

Ken

.

Nov 20 '05 #3

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

Similar topics

1
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. ...
5
by: Vinny Vin | last post by:
I would like to display a ToolTip (WinForms) when the Control associated recieves focus (when the control.enter event is triggered) as oppose to having the ToolTip displayed when the mouse hovers...
4
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...
1
by: Dino Buljubasic | last post by:
Is it possible to add tooltip to a listview item? Thanks, Dino
2
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
by: Prakash | last post by:
Hi Friends, I am developing scheduler application using C#. In my application i have provide the list view control for displaying the scheduled items. The listview control having the following...
0
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...
4
by: Pieter | last post by:
Hi, Using VB.NET 2.0, Windows Forms. I want the ToolTip to be shown on every TextBox, ComboBox and DataGridView continuously, and show the contence of these controls. Is there a way to add the...
1
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.