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

c# refresh tooltip

17
Hi everyone,

I'm having a problem while using a button with a tooltip text.
The thing is I'd like the tooltip text to change if for example the button is clicked.

This works ok, yet the problem is that the new tooltip text is not updated until the mouse is moved away from the button and then repositioned on top of the button again.
This is unclear and not very nice to the user and it would be great if the tooltiptext could be refreshed imediately in one way or another, without the need to move the mouse between controls.

Unfortunaly there doesn't seem to be a refresh method within the tooltip control. But I think this has to be the answer. Does anyone maby know if there's a different way to get it refreshed?

P.S. Actually the problem also occures with the icons in the system tray..

Any help is greatly apreciated.
Michiel
Aug 14 '07 #1
4 9339
Plater
7,872 Expert 4TB
That's really out of the scope of tooltips at that point.
Tooltips are a "hover mouse, get short blip of info about what you're hovered over"
For the kind of functionality you are looking for you might want to create your own style of tool tip.

OR, possibly make wrapper functions for the existing tooltip that change it's timeout values to imediatly expire, then reset them again and force a re-pop of the tooltip.
Not sure if that will work, just a theory.
Aug 14 '07 #2
MichK
17
Ok, I'm pretty much a beginner in c#, but I'll try if I can manage something..
Maby it would be possible to create a new usercontrol and inherit the tooltip?

Thank you for your response and suggestions.
Aug 15 '07 #3
Once the button has been pressed, try making it invisible, clearing the tooltip text for the button, refreshing the parent control, setting the new tooltip text and making the button visible again.
Dec 19 '07 #4
Building on shapeideas message, I found that turning the button visibility off then on again was sufficient to force an update of the tooltip:

tool_bar_button.ToolTipText = "New Text";
tool_bar_button.Visible = false;
tool_bar_button.Visible = true;

It still has a small delay, however.
Oct 30 '09 #5

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

Similar topics

0
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...
0
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...
6
by: ltt19 | last post by:
HI everyone, So, I have many buttons, and all of them must show a tooltip with the same string, except one word, that I must read this owrd from a variable. Although, the "ToolTip on x" property...
8
by: Radx | last post by:
Here in my web application, I have a data entry page with serval controls. Some of the controls have autopostback is set true. But the problem is when two or more people are entering data at the...
5
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...
1
by: ismailc | last post by:
Hi, I'm in desperate need for help! I need a CSS tooltip? I had one going that i got off the net, worked fine until the page does an autopost back - one has to refresh the page in order for it...
6
by: john | last post by:
I have the following textbox setup with Text & ToolTip Bindings as follows; I'm using Visual Studio 2008 VB: <asp:TextBox ID="txtDay1" runat="server" Text='<%# Eval("Day1") %>'...
3
omerbutt
by: omerbutt | last post by:
hi there i have downloaded a prototype tooltip from http://www.nickstakenburg.com/projects/prototip/ the logic it uses is to call the script after creating the <div> for example i am using the...
16
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...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.