Edit this page

Tooltips

There are two ways to assign tooltips to RadDropDownButton, namely setting the ToolTipText property of the DropDownButtonElement, or as in most of the RadControls by using the ToolTipTextNeeded event of RadDropDownButton. It is necessary the ShowItemToolTips property to be set to true which is the default value.

Setting the ToolTipText property

this.radDropDownButton1.DropDownButtonElement.ToolTipText = "Click me";

Me.radDropDownButton1.DropDownButtonElement.ToolTipText = "Click me"

note

In order to assign different tooltips for the action part and the arrow button, you must specify the ToolTipText property of the DropDownButtonElement.ActionButton or DropDownButtonElement.ArrowButton element.

buttons-dropdownbutton-tooltips 001

Setting tool tips in the ToolTipTextNeeded event

private void RadDropDownButton1_ToolTipTextNeeded(object sender, Telerik.WinControls.ToolTipTextNeededEventArgs e)
{
    ActionButtonElement actionButtonElement = sender as ActionButtonElement;
    RadArrowButtonElement arrowButtonElement = sender as RadArrowButtonElement;
    if (actionButtonElement!=null)
    {
        e.ToolTipText = "ActionButtonElement";
    }
    else if (arrowButtonElement!=null)
    {
        e.ToolTipText = "RadArrowButtonElement";
    }
}

Private Sub RadDropDownButton1_ToolTipTextNeeded(sender As Object, e As Telerik.WinControls.ToolTipTextNeededEventArgs)
    Dim actionButtonElement As ActionButtonElement = TryCast(sender, ActionButtonElement)
    Dim arrowButtonElement As RadArrowButtonElement = TryCast(sender, RadArrowButtonElement)
    If actionButtonElement IsNot Nothing Then
        e.ToolTipText = "ActionButtonElement"
    ElseIf arrowButtonElement IsNot Nothing Then
        e.ToolTipText = "RadArrowButtonElement"
    End If
End Sub

buttons-dropdownbutton-tooltips 002

note

The ToolTipTextNeeded event has higher priority and overrides the tool tips set in the ToolTipText property.