Edit this page

ToolTips

There are two ways to assign tool tips to elements in RadMap, namely setting the ToolTipText property of a MapVisualElement, or as in most of the RadControls by using the ToolTipTextNeeded event of RadMap.

Setting tool tips of MapVisualElements

The code snippet below demonstrates how you can assign a tool tip to zoom out button in RadMap.

Using the ToolTipText property

this.radMap1.ShowItemToolTips = true;
this.radMap1.MapElement.NavigationBarElement.ZoomOutButton.ToolTipText = "Zoom out";

Me.radMap1.ShowItemToolTips = True
Me.radMap1.MapElement.NavigationBarElement.ZoomOutButton.ToolTipText = "Zoom out"

Figure 1: Tool tip assigned by using the ToolTipText property

map-tooltips 001

Setting tool tips in the ToolTipTextNeeded event

The code snippet below demonstrates how you can use ToolTipTextNeeded event handler to set ToolTipText for the given MapVisualElement.

Using the ToolTipTextNeeded event

private void radMap1_ToolTipTextNeeded(object sender, Telerik.WinControls.ToolTipTextNeededEventArgs e)
{
    MapZoomInButton zoomInButton  = sender as MapZoomInButton;
    if ( zoomInButton!=null)
    {
        e.ToolTipText = "Zoom in";
    }
}

Private Sub radMap1_ToolTipTextNeeded(sender As Object, e As Telerik.WinControls.ToolTipTextNeededEventArgs)
    Dim zoomInButton As MapZoomInButton = TryCast(sender, MapZoomInButton)
    If zoomInButton IsNot Nothing Then
        e.ToolTipText = "Zoom in"
    End If
End Sub

Figure 2: Tool tip assigned by using the ToolTipTextNeeded event

map-tooltips 002

important

The ToolTipTextNeeded event has higher priority and overrides the tool tips set by the ToolTipText property of MapVisualElements.