473,597 Members | 2,113 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tooltip problem

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 history for each item I have
selected. For example, let's say I select an item. The tooltip pops up with
the text. Good. Then I select a 2nd item, and the tooltip shows that text.
Good. Then, I drag the cursor away from the listbox. The tooltip disappears.
Good. Then I drag it over the listbox. The tooltip will pop up 2 items,
which are the 2 previously-viewed items. Not good. If I select 20 listbox
items and perform the same steps, the tooltip displays 20 items when I
re-hover over the listbox. Not good.

What am I doing wrong?

Here's my code:

Private Sub MyListBox_Selec tedIndexChanged (.....) Handles etc..
Dim t As Tooltip
Dim i as ItemClass

' Set a reference to the item to display additional info for
i = MyListBox.Selec tedItem()

t = New Tooltip
With t
.ShowAlways = False
.InitialDelay = 50
.AutoPopDelay = 5000
.ReshowDelay = 1000
.SetToolTip(Me. MyListBox, i.MyExtraInfo)
End With

Sep 19 '06 #1
4 1525
ag
What is "i.MyExtraI nfo" ???
Explain.

Sep 20 '06 #2
I'm loading data into the listbox using a class.

ExtraInfo is a member of that class. ExtraInfo is some extra info related to
the selected item, added to the tooltip to provide the user with more
information about their selection.

"ag" <na******@gmail .comwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.com...
What is "i.MyExtraI nfo" ???
Explain.


Sep 20 '06 #3
I haven't checked your code, but my guess is the 'New' statement.
You may need to dispose of the previous tooltip first.
Sep 20 '06 #4
Exactly correct. Thanks!

"Stuart Nathan" <st***********@ homecall.co.ukw rote in message
news:uK******** ******@TK2MSFTN GP06.phx.gbl...
I haven't checked your code, but my guess is the 'New' statement.
You may need to dispose of the previous tooltip first.


Sep 22 '06 #5

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

Similar topics

2
314
by: Simon Richardson | last post by:
I recently found that one of my application was leaking memory every time I closed a MDIChild form. The garbage collector never reclaimed it and my windows handles kept increasing and increasing until eventually the application crashed After three days of looking through all of my code I found that it was the TOOLTIP component that was causing the problem The overcome the problem I had to add the following to the CLOSING procedure in the...
6
2690
by: Robert | last post by:
Hello. I have been trying out the Lebans ToolTip Classes at http://www.lebans.com/tooltip.htm, to display "balloon" style help tips in a form. The classes I am using are located at http://www.lebans.com/DownloadFiles/A2kTooltip.zip So far the classes work perfectly, except that now I need to extend it to support other controls besides the ones given in the example form. I have gotten it to work with some controls, but not others. I...
0
1531
by: Yves Royer | last post by:
Hi, I'm currently writing an application (in VS 2005 bčta 2) and made some own user controls. In each user control I added a ToolTip object so i can set some tooltips on checkboxes etc. What I wanted to do is to add a ToolTip object on the starting form, and pass this ToolTip object to the user controls. In each user control I created a property ToolTip with only a setter which accepts the passed ToolTip.
0
1560
by: Yves Royer | last post by:
Hi, My first post didn't show up so here's a second try. I'm currently writing an application (in VS 2005 bčta 2) and made some own user controls. In each user control I added a ToolTip object so i can set some tooltips on checkboxes etc. What I wanted to do is to add a ToolTip object on the starting form, and pass this ToolTip object to the user controls. In each user control I
0
10682
by: Lucian Wischik | last post by:
I'm using ToolTip.Show(x,y,..) to show my balloon-style tooltip at a specified coordinate. Most of the time it works fine and the "tip" of the balloon points exactly to my specified (x,y) coordinates. But if the (x,y) coordinates are too far to the right, then the "tip" of the balloon now points to some spurious coordinate that's unrelated to my (x,y). Why? How can I stop this? How can I make the balloon's tip point exactly where I...
0
1450
by: sonu | last post by:
Hi all, I am experiencing a strange problem for the call setToolTip while running my application on frmaework 2.0. I have found 2 messages on google discussing the same issue but there are no replys It dumps saying something like System.InvalidOperationException: Adding the tip to the native ToolTip control did not succeed.
5
9804
by: =?Utf-8?B?cGV0ZTE5Njk=?= | last post by:
I use Visual Studio 2005 and created a very simple Form with one button. I added a Tooltip for that button. It shows fine the first time I hover over that button. But if I let it disappear by the maximum time it should be displayed, it never shows again over that button. Is that intended? And what can I do to make it show again?
0
1618
by: walve_wei | last post by:
<1>use the D3D control panel, enable the debug DLL and maximum validation,for D3D control panel ,you need to install the directx sdk. <2>Start up the debug monitor (<MSVC install directory>\Common7\Tools \Bin\winnt\Dbmon.Exe). <3>If you use the tooltip in native code,then run the program,show the tooltip,then exit the program, the Dbmon.exe will report serious direct3d9 memleak in xp and vista os.but If I use the wpf tooltip in c#,it is...
16
2763
by: Charles Law | last post by:
I have to take this personally now. Tooltips have been flakey since the dawn of .NET, but to still have to put up with a disappearing tooltip in VS 2008 is getting beyond a joke. Tooltips have always done this, so isn't it about time they were fixed? I have a tooltip that I assign to a button control on my form. I hover over the button and up pops the tooltip. I move away and the tooltp fades. I hover again, and back comes the tooltip....
5
2519
omerbutt
by: omerbutt | last post by:
hi there i have a link in my pge and on mouseover i want to show the tooltip by getting the coordinates x and y from the screen where the onmouseover event occoured can any one teell me the way to get the right coordinates in IE and FF my code is not working properly or say it is not a generic code that i could reuse it has the positioning problem so in all my sites where i have to use the tooltip i have to position is manually on that page...
0
7886
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8272
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8381
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8258
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5847
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5431
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3927
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1494
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1238
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.