BF2Statistics.Utilities.Tipsy.SetToolTip C# (CSharp) Method

SetToolTip() public static method

Sets a tooltip object for a control
public static SetToolTip ( Control control, string text, bool ShowAlways = false, int timeToDisplay = 5000 ) : void
control System.Windows.Forms.Control
text string
ShowAlways bool
timeToDisplay int
return void
        public static void SetToolTip(Control control, string text, bool ShowAlways = false, int timeToDisplay = 5000)
        {
            // Prevent cross thread errors
            if (control.InvokeRequired)
            {
                control.Invoke((Action)delegate
                {
                    ToolTip tt = Tipsy.GetControlToolTip(control);
                    tt.ShowAlways = ShowAlways;
                    tt.AutoPopDelay = timeToDisplay;
                    tt.SetToolTip(control, text);
                });
            }
            else
            {
                ToolTip tt = GetControlToolTip(control);
                tt.SetToolTip(control, text);
            }
        }