RadButton : ToolTip duration

2 posts, 1 answers
  1. Francois
    Francois avatar
    52 posts
    Member since:
    Dec 2010

    Posted 04 Apr 2012 Link to this post

    Hi,

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

    Thanks!

    --
    Frank
  2. Answer
    Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 09 Apr 2012 Link to this post

    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 >>
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top