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

ToolTipText like Office 2010 style

2 Answers 128 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Jean-Marc Windholz
Top achievements
Rank 1
Jean-Marc Windholz asked on 04 Oct 2010, 02:47 PM
Hi,
I'm trying to set the tooltiptext of the radbutton with a title (first row in bold style) and a second part where write the description,
for instance like the microsoft word 2010 style.
First of all, I would like to know if is it possible to do, and if yes, how ?

thank you so much

2 Answers, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 04 Oct 2010, 05:08 PM
Hi, 

You can reach it through the designer. In Telerik they are called ScreenTips. Or you can set them through code. 


Here is a link to the Telerik RiboonBar section for adding Screentips
http://www.telerik.com/help/winforms/ribbonbarfundamentalsusingscreentips.html

Here is a static (shared) method that you can use to add a screentip to any rad item

Public Shared Sub AddScreenTip(ByVal item As RadItem, ByVal headerText As String, ByVal bodyText As String)
 
    If item Is Nothing Then
        Throw New System.ArgumentNullException("item")
    End If
    If headerText Is Nothing Then
        Throw New System.ArgumentNullException("headerText")
    End If
    If bodyText Is Nothing Then
        Throw New System.ArgumentNullException("bodyText")
    End If
 
    If Not item.ScreenTip Is Nothing Then
        item.ScreenTip.Items.Clear()
    End If
    Dim Tip As New RadOffice2007ScreenTipElement()
    Tip.CaptionLabel.Text = headerText
    Tip.MainTextLabel.Text = bodyText
    item.ScreenTip = Tip
End Sub

Hope that helps
Richard
0
Jean-Marc Windholz
Top achievements
Rank 1
answered on 11 Oct 2010, 02:36 PM
Hi,
Thank you so much for the solution.
Now It works fine :)

Bye
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Jean-Marc Windholz
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Jean-Marc Windholz
Top achievements
Rank 1
Share this question
or