Wednesday, June 29, 2011

Show a ToolTip on a Control

ToolTip buttonToolTip = new ToolTip();
//Title of tooltip window
buttonToolTip.ToolTipTitle = "Ivan Osorio De anda";
//Represents weather a fade effect should be used when displaying the tooltip
buttonToolTip.UseFading = true;
buttonToolTip.UseAnimation = true;
//Gets or sets a value indicating whether the ToolTip should use a balloon window
buttonToolTip.IsBalloon = true;
buttonToolTip.ToolTipIcon = ToolTipIcon.Info;
//Displays if tooltip is displayed even the parent control is not active.
buttonToolTip.ShowAlways = true;
               
//The period of time the ToolTip remains visible if the pointer is stationary on a control with specified ToolTip text.
buttonToolTip.AutoPopDelay = 5000;
//Gets or sets the time that passes before the ToolTip appears.
buttonToolTip.InitialDelay = 20;
//Gets or sets the length of time that must transpire before subsequent ToolTip windows appear as the pointer moves from one control to another.
buttonToolTip.ReshowDelay = 25;
//call SetToolTip method and pass a control and text
buttonToolTip.SetToolTip(DataGridViewTest, "Message!!");

No comments:

Post a Comment