This is a migrated thread and some comments may be shown as answers.

RadButton : ToolTip duration

1 Answer 142 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Francois
Top achievements
Rank 1
Francois asked on 04 Apr 2012, 09:22 PM
Hi,

Is there a way to control the tooltip duration? I'm looking for a way to keep the tooltip always visible.

Thanks!

--
Frank

1 Answer, 1 is accepted

Sort by
0
Accepted
Nikolay
Telerik team
answered on 09 Apr 2012, 12:53 PM
Hello Frank,

Thank you for the questions.

You can get the ToolTip object out of a RadControl and set its AutoPopupDelay to a big value, for example, to int.MaxValue:

public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
 
        ToolTip toolTip = this.radButton1.ElementTree.ComponentTreeHandler.Behavior.ToolTip;
        toolTip.AutoPopDelay = int.MaxValue;
        toolTip.ShowAlways = true;
        this.radButton1.ToolTipTextNeeded += new Telerik.WinControls.ToolTipTextNeededEventHandler(radButton1_ToolTipTextNeeded);
    }
 
    void radButton1_ToolTipTextNeeded(object sender, Telerik.WinControls.ToolTipTextNeededEventArgs e)
    {
        e.ToolTipText = "Hi, I am a button";
    }
}

I hope this helps.

Regards,
Nikolay
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Francois
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or