473,396 Members | 1,987 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,396 software developers and data experts.

Tooltip for Bound ListBox and Combobox

I'm working with Visual Basic .Net 2005

I'm trying to create a tooltip for a bound listbox and a combobox. I want the tooltip to be of the item the mouse is hovering over. Is there an easy way to do this? I stumbled across some code that required identifying the position of the mouse in X, Y and then finding the height of each item, etc, etc. Is that going to be my best option?
Mar 5 '08 #1
4 2466
Hi,

Can you please tell that are you working on Web project or windows project. If that is web base then their is simply property for controls that is tooltip in protperty window.

Thanks
Mahesh





I'm working with Visual Basic .Net 2005

I'm trying to create a tooltip for a bound listbox and a combobox. I want the tooltip to be of the item the mouse is hovering over. Is there an easy way to do this? I stumbled across some code that required identifying the position of the mouse in X, Y and then finding the height of each item, etc, etc. Is that going to be my best option?
Mar 6 '08 #2
My Application is for Windows. Is there a way to do it in Windows?
Mar 6 '08 #3
Hi,

Try this one

Assembly System.Winforms.dll.
Namespace System.Winforms.

In .NET, the ToolTip class provides tooltip functionality for Windows Controls. Creating a ToolTip object is similar to any other .NET class object. You call Constructor to create a tooltip object.

There are two steps to add a tooltip to a control. First you create an instance of ToolTip control using ToolTip class. And second you attach tooltip to a control by using ToolTip class's SetToolTip member and call set Active property true.

Active = true.

Say you want to add a tooltip to a button, button1.

1. Create a Tooltip Object

Private toolTip1 As ToolTip = New System.WinForms.ToolTip (Me.components)

2. Attach tooltip to the control.

Private toolTip1 As ToolTip = New System.WinForms.ToolTip (Me.components)
toolTip1.SetToolTip (button1, "This is tooltip test")
toolTip1.Active = True



Thanks
Mahesh






My Application is for Windows. Is there a way to do it in Windows?
Mar 10 '08 #4
I can create a tooltip for the bound listbox and the combobox. Unfortunately, what I cannot do, is make the tooltip say what I want it to say. I want the tooltip to read the text of an item that the mouse is hovering over in both the combobox and the listbox.

Thanks for your last response though, if I had not been able to get my tooltip started, that would have helped.
Mar 10 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Mike Top | last post by:
I want a listbox to position to a letter provided by the user. Normally, when the user keys a letter, the listbox positions automatically to the first entry starting with that letter in the first...
6
by: Alpha | last post by:
I have a listbox with datasource from a dataview. When a user selects a different item in a combobox then I need to refresh the listbox to the appropriate listing based on that combobox's selected...
11
by: Timo Kunze | last post by:
Hi! If you move the mouse over an item that's part of a treeview and wider than the treeview, a tooltip showing the full item text will be displayed. I try to do this for ListBoxes and...
5
by: Nikolay Petrov | last post by:
I have a ListBox, which is binded to a DataTable. I would like to display a tooltip when the mouse cursor hovers over the items in the ListBox. I don't know how to find the index if ListBox item,...
4
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box...
4
by: reidarT | last post by:
I want to get the text from a bound combobox in a variable I try to use strVar = me.cboName.SelectedText.Tostring, but it doesn't work. reidarT
4
by: Tim Zych | last post by:
I'm displaying a tooltip related to a listbox based on the selected item. It works well except when I move the cursor away from the listbox and then hover back over it, the tooltip pops up...
0
by: Frnak McKenney | last post by:
Can I use a bound ComboBox for both browsing and editing? I'm working on a small, standalone database application using Visual C#.NET 2003 and an Access data file. In order to keep the number...
0
by: Jake Montgomery | last post by:
I am using .NET 2.0 forms and running on Windows XP SP2. When I have a tooltip on a combo box, and the combo box is expanded (“dropped down”) using the arrow, it will no longer display it’s...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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
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,...

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.