p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   C# (http://p2p.wrox.com/forumdisplay.php?f=22)
-   -   Chaging text of tool tip with code? (http://p2p.wrox.com/showthread.php?t=47278)

Gridley September 1st, 2006 11:29 AM

Chaging text of tool tip with code?
 
I would like to alter the text of a tool tip during exectution of my application. I can't seem to find the right code to the actual text displayed. Is that a property of the control the tip is associated with or the tool tip itself? Would someone be able to provide an example for me?

Many thanks.


dparsons September 1st, 2006 11:57 AM

If memory serves me:

ToolTip toolTip = new System.WinForms.ToolTip (this.components);
toolTip.SetToolTip (btnWhatever, "This is my text");
toolTip.Active = true;

"The one language all programmers understand is profanity."

Gridley September 1st, 2006 12:01 PM

That's got it - thanks! That middle line was throwing me:
this.toolTip1.SetToolTip(this.btnHelp, VersionNumber.ToString());



All times are GMT -4. The time now is 09:40 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.