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

HTML tooltip for radbutton

1 Answer 159 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
TelDev
Top achievements
Rank 1
TelDev asked on 10 May 2012, 02:23 PM
Hi,

I am trying to add HTML text for tooltip for radbuttons.

In the  ToolTipTextNeeded event i can set
e.tooltiptext = "mytooltiptext".

If mytooltiptext has HTML like formatting text, html tags appear on tootip. I am using the HTML tags from below link

http://www.telerik.com/help/winforms/buttons-button-html-like-text-formatting.html

Thanks
TelDev

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 15 May 2012, 09:32 AM
Hello,

Thank you for writing.

Our tool-tips are using the Windows engine for its rendering, thus they does not support our Html-like rendering. Instead, you can use our RadOffice2007ScreenTipElement that support Html-like rendering. Here is an example:
private RadOffice2007ScreenTipElement screenTip;
 
public Form1()
{
            InitializeComponent();
            this.radButton1.ScreenTipNeeded += new ScreenTipNeededEventHandler(radButton1_ScreenTipNeeded);
}
 
private void radButton1_ScreenTipNeeded(object sender, Telerik.WinControls.ScreenTipNeededEventArgs e)
{
            if (screenTip == null)
            {
                screenTip = new Telerik.WinControls.UI.RadOffice2007ScreenTipElement();
            }
  
            screenTip.CaptionLabel.Text = "<html><color=red>Hello";
            screenTip.MainTextLabel.Text = "<html><b>Text"
            this.radButton1.ButtonElement.ScreenTip = screenTip;
        }
    }

More information regarding the screen tips can be found here: http://www.telerik.com/help/winforms/ribbonbar-adding-screen-tips.html.

I hope this helps.

Greetings,
Peter
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
TelDev
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or