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

tooltip

2 Answers 137 Views
GridView
This is a migrated thread and some comments may be shown as answers.
deng bruce
Top achievements
Rank 1
deng bruce asked on 09 Aug 2012, 09:28 AM
Hi
    Can i set the width of tooltip show?  if can, how do?    if the tooltip text is too long, the tooltip showed over the width of screen now. thanks very much!

2 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 14 Aug 2012, 07:00 AM
Hi Deng,

Thank you for writing.

The default ToolTips used are the standard ToolTIps. Those do not allow altering their size. As an alternatively, I can offer using RadOffice2007ScreenTipElement here is an example:
public partial class Form1 : Form
   {
       RadOffice2007ScreenTipElement screenTip = new RadOffice2007ScreenTipElement();
 
       public Form1()
       {
           InitializeComponent();
 
           radButton1.ScreenTipNeeded += new ScreenTipNeededEventHandler(radButton1_ScreenTipNeeded);
       }
 
       void radButton1_ScreenTipNeeded(object sender, ScreenTipNeededEventArgs e)
       {
           RadButtonElement btn = e.Item as RadButtonElement;
           if (btn != null)
           {
               screenTip.CaptionLabel.Text = "Very very long text ";
               screenTip.MainTextLabel.Text = "Main text";
               screenTip.AutoSize = false;
               screenTip.EnableCustomSize = true;
               screenTip.Size = new System.Drawing.Size(500, 500);
               btn.ScreenTip = screenTip;
           }
       }
   }

I hope that you find this information useful.

All the best,
Stefan
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
0
Stefan
Telerik team
answered on 14 Aug 2012, 07:02 AM
A quick follow up. Here is also a link to our documentation where you can find information regarding the screen tips: http://www.telerik.com/help/winforms/ribbonbar-adding-screen-tips.html 
 
All the best,
Stefan
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Tags
GridView
Asked by
deng bruce
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or