.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> Visual Studio >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Infragistics - WINTOOLTIPMANGER

Posted By:Deepika Haridas       Posted Date: December 17, 2009    Points: 10    Category: Visual Studio    URL: http://www.dotnetspark.com  
 

Infragistics - WINTOOLTIPMANGER



WinToolTipManager adds an extender property called "UltraToolTip" to any control. The UltraToolTip property allows for a control to be managed by the WinToolTipManager. This allows a tooltip to automatically display when the mouse hovers over the control.

1. Namespaces Used :

using Infragistics.Win;
using Infragistics.Win.UltraWinToolTip;


2. Place an UltraToolTipManager component on the Form

WinToolTip

3. In order to set up WinToolTip properties, you must first get the ToolTipInfo for the control. Do this using the GetUltraToolTip method of the WinToolTipManager. Place the following code in the Form_Load event.


// Get the ToolTipInfo for TextBox1
UltraToolTipInfo toolTipInfo =
this.ultraToolTipManager1.GetUltraToolTip(this.textBox1);


4. Set the ToolTipText

// Set the ToolTipText.
toolTipInfo.ToolTipText = "Enter some text here.";


5. Set optional properties

// Set the ToolTipTitle
toolTipInfo.ToolTipTitle = "This is textBox1";

// Apply an image
toolTipInfo.ToolTipImage = ToolTipImage.Info;

// Apply an appearance
toolTipInfo.Appearance.BackColor = Color.White;
toolTipInfo.Appearance.BackColor2 = Color.Chartreuse;
toolTipInfo.Appearance.BackGradientStyle = GradientStyle.Circular;
toolTipInfo.Appearance.ForeColor = Color.Black;

// Apply an appearance to the Title.
toolTipInfo.ToolTipTitleAppearance.ForeColor = Color.Red;


6. Run the application
Run the application and hover the mouse over the TextBox. The WinToolTip will display after a delay specified by the InitialDelay property of the WinToolTipManager (half a second by default).

WinToolTip


     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend