New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

RadToolTipBase class

Definition

Namespace:Telerik.Web.UI

Assembly:Telerik.Web.UI.dll

Syntax:

C#
[RequiredScript(typeof(RadToolTipScripts))]
[ClientScriptResource("Telerik.Web.UI.RadToolTip", "Telerik.Web.UI.Common.Core.js")]
[EmbeddedSkin("ToolTip")]
[EmbeddedSkin("ToolTip", "Default")]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Lightweight, typeof(RadToolTipBase))]
[RequiredCss("Telerik.Web.UI.Skins.Common.MaterialRipple.css", RenderMode.Lightweight, typeof(RadButton))]
public abstract class RadToolTipBase : RadWebControl, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IScriptControl, IControlResolver, IPostBackDataHandler, ISkinnableControl, IControl

Inheritance: objectControlWebControlRadWebControlRadToolTipBase

Derived Classes: RadToolTipRadToolTipManager

Implements: IAttributeAccessorIComponentIControlIControlBuilderAccessorIControlDesignerAccessorIControlResolverIDataBindingsAccessorIDisposableIExpressionsAccessorIParserAccessorIPostBackDataHandlerIScriptControlISkinnableControlIUrlResolutionService...

Inherited Members WebControl.AddAttributesToRender(HtmlTextWriter)WebControl.ApplyStyle(Style)WebControl.CopyBaseAttributes(WebControl)WebControl.CreateControlStyle()WebControl.LoadViewState(object)WebControl.TrackViewState()WebControl.MergeStyle(Style)WebControl.Render(HtmlTextWriter)WebControl.RenderBeginTag(HtmlTextWriter)WebControl.RenderEndTag(HtmlTextWriter)WebControl.RenderContents(HtmlTextWriter)WebControl.SaveViewState()WebControl.AccessKeyWebControl.AttributesWebControl.BackColorWebControl.BorderColorWebControl.BorderWidthWebControl.BorderStyleWebControl.ControlStyleWebControl.ControlStyleCreatedWebControl.CssClassWebControl.DisabledCssClassWebControl.StyleWebControl.EnabledWebControl.EnableThemingWebControl.FontWebControl.ForeColorWebControl.HasAttributesWebControl.IsEnabledWebControl.SupportsDisabledAttributeWebControl.SkinIDWebControl.TabIndexWebControl.TagKeyWebControl.TagNameWebControl.ToolTipControl.ResolveAdapter()Control.HasEvents()Control.GetRouteUrl(object)Control.GetRouteUrl(string, object)Control.GetRouteUrl(RouteValueDictionary)Control.GetRouteUrl(string, RouteValueDictionary)Control.GetUniqueIDRelativeTo(Control)Control.ApplyStyleSheetSkin(Page)Control.OnDataBinding(EventArgs)Control.DataBind()Control.DataBind(bool)Control.DataBindChildren()Control.AddParsedSubObject(object)Control.EnsureID()Control.OnInit(EventArgs)Control.ClearChildState()Control.ClearChildControlState()Control.ClearChildViewState()Control.ClearEffectiveClientIDMode()Control.ClearCachedClientID()Control.Focus()Control.LoadControlState(object)Control.MapPathSecure(string)Control.OpenFile(string)Control.OnLoad(EventArgs)Control.OnPreRender(EventArgs)Control.BuildProfileTree(string, bool)Control.SaveControlState()Control.RenderChildren(HtmlTextWriter)Control.RenderControl(HtmlTextWriter)Control.RenderControl(HtmlTextWriter, ControlAdapter)Control.OnUnload(EventArgs)Control.Dispose()Control.RaiseBubbleEvent(object, EventArgs)Control.OnBubbleEvent(object, EventArgs)Control.AddedControl(Control, int)Control.CreateControlCollection()Control.CreateChildControls()Control.ResolveUrl(string)Control.ResolveClientUrl(string)Control.FindControl(string)Control.FindControl(string, int)Control.GetDesignModeState()Control.HasControls()Control.IsLiteralContent()Control.EnsureChildControls()Control.RemovedControl(Control)Control.SetDesignModeState(IDictionary)Control.SetRenderMethodDelegate(RenderMethod)Control.ClientIDModeControl.ClientIDControl.ClientIDSeparatorControl.ContextControl.AdapterControl.DesignModeControl.EventsControl.IDControl.IsChildControlStateClearedControl.EnableViewStateControl.ViewStateModeControl.IsViewStateEnabledControl.NamingContainerControl.IdSeparatorControl.LoadViewStateByIDControl.PageControl.RenderingCompatibilityControl.TemplateControlControl.ParentControl.TemplateSourceDirectoryControl.AppRelativeTemplateSourceDirectoryControl.SiteControl.VisibleControl.UniqueIDControl.HasChildViewStateControl.ControlsControl.ValidateRequestModeControl.ViewStateControl.ViewStateIgnoresCaseControl.ChildControlsCreatedControl.IsTrackingViewStateControl.DisposedControl.DataBindingControl.InitControl.LoadControl.PreRenderControl.Unloadobject.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

C#
protected RadToolTipBase()

Properties

Get/Set the animation effect of the tooltip. Turned off by default.

C#
[ClientControlProperty]
public ToolTipAnimation Animation { get; set; }
Property Value:

Takes one of the members of the ToolTipAnimation enumerator. The default value is None.

Sets/gets the duration of the animation in milliseconds. 500 by default.

C#
[ClientControlProperty]
public int AnimationDuration { get; set; }

Get/Set the delay (in milliseconds) after which the tooltip will hide if the mouse stands still over the target element. 3000 by default.

C#
[ClientControlProperty]
public int AutoCloseDelay { get; set; }

Get/Set overflow of the tooltip's content area.

C#
[ClientControlProperty]
public ToolTipScrolling ContentScrolling { get; set; }
Property Value:

Takes one of the members of the ToolTipScrolling enumeration. The default value is Default which leaves the default behavior of the HTML elements with respect to handling content larger than their original dimensions (usually they stretch visually, but programmatically keep their orignal dimensions).

When set to true enables support for WAI-ARIA

C#
[ClientControlProperty]
[ClientPropertyName("enableAriaSupport")]
public bool EnableAriaSupport { get; set; }

Gets or sets a value indicating whether the RadToolTip should have rounded corners. True by default.

C#
[ClientControlProperty]
[ClientPropertyName("enableRoundedCorners")]
public bool EnableRoundedCorners { get; set; }
Property Value:

True if there should be rounded corners; otherwise false. The default value is true.

Gets or sets a value indicating whether the RadToolTip should have shadow. True by default.

C#
[ClientControlProperty]
[ClientPropertyName("enableShadow")]
public bool EnableShadow { get; set; }
Property Value:

True if there should be shadow; otherwise false. The default value is true.

Get/Set the Height of the tooltip in pixels.

C#
[ClientControlProperty]
[TypeConverter(typeof(UnitConverter))]
public override Unit Height { get; set; }

Overrides: RadWebControl.Height

Get/Set delay (in milliseconds) for the tooltip to hide after the mouse leaves the target element. 300 by default.

C#
[ClientControlProperty]
public int HideDelay { get; set; }

Get/Set the client event at which the tooltip will be hidden.

C#
[ClientControlProperty]
public ToolTipHideEvent HideEvent { get; set; }
Property Value:

Takes one of the members of the ToolTipHideEvent enumerator. The default value is Default, which means the tooltip will hide when the mouse moves out of the target element.

Get/Set the indicator whether the Alt specified for the target should be ignored or not

C#
[ClientControlProperty]
public bool IgnoreAltAttribute { get; set; }

You can use the IgnoreAltAttribute to instruct the RadToolTip to ignore the AlternateText and alt properties and not remove them from its target element. This will result in a change of the content source priorities for images and a second tooltip being shown under IE6 and IE7, as these browsers interpret the alt attribute like the title attribute.

This property is obsolete. Please use HideEvent="ManualClose" instead. Gets/Sets whether the tooltip will need to be closed manually by the user using the [x] button, or will close automatically.

C#
[Obsolete("This property is obsolete. Please use HideEvent=\"ManualClose\" instead.")]
public bool ManualClose { get; set; }

Get/Set the manual close button's tooltip text.

C#
public string ManualCloseButtonText { get; set; }

Gets or sets a value indicating whether a tooltip is modal or not.

C#
[ClientControlProperty]
[Browsable(true)]
[Bindable(true)]
public bool Modal { get; set; }
Property Value:

The default value is false.

Get/Set whether the tooltip will move to follow mouse movement over the target control or will stay fixed.

C#
[ClientControlProperty]
public bool MouseTrailing { get; set; }

Get/Set the tooltip's horizontal offset from the target control in pixels. Works in cooperation with the Position property.

C#
[ClientControlProperty]
public int OffsetX { get; set; }
Property Value:

Takes an integer specifying how many pixels the offset will be. Zero by default.

Get/Set the tooltip's vertical offset from the target control in pixels. Works in cooperation with the Position property.

C#
[ClientControlProperty]
public int OffsetY { get; set; }
Property Value:

Takes an integer specifying how many pixels the offset will be. Zero by default.

Gets or sets the name of client-side JavaScript function that is called just before the RadToolTip hides.

C#
[ClientControlEvent]
[ClientPropertyName("beforeHide")]
public virtual string OnClientBeforeHide { get; set; }
Property Value:

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

If specified, the OnClientBeforeHide client-side event handler that is called before the tooltip is hidden. Two parameters are passed to the handler:

  • sender, the RadToolTip object.
  • args.

This event can be cancelled.

Example:
C#
The following example demonstrates how to use the
<strong>OnClientBeforeHide</strong> property.

<p>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;script type="text/javascript"&gt;<br />
         function OnBeforeHideHandler(sender, args)<br />
         {<br />
         var tooltip = sender;<br />
         }<br />
        &lt;/script&gt;
    </div>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;radsld:RadToolTip ID="RadToolTip1"<br />
         runat= "server"<br />
        <strong>OnClientBeforeHide="OnBeforeHideHandler"</strong>&gt;<br />
        ....<br />
        &lt;/radsld:RadToolTip&gt;
    </div>
</p>

Gets or sets the name of client-side JavaScript function that is called just before the RadToolTip is shown.

C#
[ClientControlEvent]
[ClientPropertyName("beforeShow")]
public virtual string OnClientBeforeShow { get; set; }
Property Value:

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

If specified, the OnClientBeforeShow client-side event handler is called before the RadToolTip is shown. Two parameters are passed to the handler:

  • sender, the RadToolTip object.
  • args.

This event can be cancelled.

Example:
C#
The following example demonstrates how to use the
<strong>OnClientBeforeShow</strong> property.

<p>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;script type="text/javascript"&gt;<br />
         function OnToolTipShowHandler(sender, args)<br />
         {<br />
         var tooltip = sender;<br />
         }<br />
        &lt;/script&gt;
    </div>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;radsld:RadToolTip ID="RadToolTip1"<br />
         runat= "server"<br />
        <strong>OnClientBeforeShow="OnToolTipShowHandler"</strong>&gt;<br />
        ....<br />
        &lt;/radsld:RadToolTip&gt;
    </div>
</p>

Gets or sets the name of client-side JavaScript function that is called just after the RadToolTip is hidden.

C#
[ClientControlEvent]
[ClientPropertyName("hide")]
public virtual string OnClientHide { get; set; }
Property Value:

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

If specified, the OnClientHide client-side event handler that is called after the tooltip is hidden. Two parameters are passed to the handler:

  • sender, the RadToolTip object.
  • args.

This event cannot be cancelled.

Example:
C#
The following example demonstrates how to use the
<strong>OnClientHide</strong> property.

<p>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;script type="text/javascript"&gt;<br />
         function OnHideHandler(sender, args)<br />
         {<br />
         var tooltip = sender;<br />
         }<br />
        &lt;/script&gt;
    </div>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;radsld:RadToolTip ID="RadToolTip1"<br />
         runat= "server"<br />
        <strong>OnClientHide="OnHideHandler"</strong>&gt;<br />
        ....<br />
        &lt;/radsld:RadToolTip&gt;
    </div>
</p>

Gets or sets the name of client-side JavaScript function that is called just after the RadToolTip is shown.

C#
[ClientControlEvent]
[ClientPropertyName("show")]
public virtual string OnClientShow { get; set; }
Property Value:

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

If specified, the OnClientShow client-side event handler is called after the tooltip is shown Two parameters are passed to the handler:

  • sender, the RadToolTip object.
  • args.

This event cannot be cancelled.

Example:
C#
The following example demonstrates how to use the
<strong>OnClientShow</strong> property.

<p>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;script type="text/javascript"&gt;<br />
         function OnClientShowHandler(sender, args)<br />
         {<br />
         var tooltip = sender;<br />
         }<br />
        &lt;/script&gt;
    </div>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;radsld:RadToolTip ID="RadToolTip1"<br />
         runat= "server"<br />
        <strong>OnClientShow="OnClientShowHandler"</strong>&gt;<br />
        ....<br />
        &lt;/radsld:RadToolTip&gt;
    </div>
</p>

Gets or sets a value indicating whether the tooltip will create an overlay element to ensure it will be displayed over a flash element.

C#
[ClientControlProperty]
[Browsable(true)]
[Bindable(true)]
public bool Overlay { get; set; }
Property Value:

The default value is false.

Get/Set the top/left position of the tooltip relative to the target element

C#
[ClientControlProperty]
public ToolTipPosition Position { get; set; }
Property Value:

Takes one of the members of the Telerik.Web.UI.ToolTipPosition enumerator. The default value is BottomCenter.

If there isn't enough room in the viewport to show the tooltip in the specified position (this depends on the tooltip's Width and Height and the target's position) the tooltip will automatically reposition itself so that it is entirely visible. Usually this will be the opposite position. All positions are tried until enough room is found on the screen, if there isn't the top left corner of the tooltip will be visible and scrollbars will be produced.

Get/Set whether the tooltip should appear relative to the mouse, to the target element or to the browser viewport. Works in cooperation with the Position property.

C#
[ClientControlProperty]
public ToolTipRelativeDisplay RelativeTo { get; set; }
Property Value:

Takes a member of the ToolTipRelativeDisplay enumerator. The default value is Mouse.

When the display is relative to the mouse or to the element the tooltips are positioned absolutely on the page, when relative to the browser viewport they have fixed position and do not scroll with the rest of the page.

Get/Set whether the tooltip should be added as a child of the form element or as a child of its direct parent. True by default.

C#
[ClientControlProperty]
public bool RenderInPageRoot { get; set; }

Get/Set whether the tooltip will show a small arrow pointing to its target element. True by default.

C#
[ClientControlProperty]
public bool ShowCallout { get; set; }

Get/Set the time (in milliseconds) for which the user should hold the mouse over a target element for the tooltip to appear. The default is 400.

C#
[ClientControlProperty]
public int ShowDelay { get; set; }

Get/Set the client event at which the tooltip will be made visible for a particular target control.

C#
[ClientControlProperty]
public ToolTipShowEvent ShowEvent { get; set; }
Property Value:

Takes one of the members of the ToolTipShowEvent enumerator. The default value is OnMouseOver.

This property is obsolete. Please use HideEvent="LeaveToolTip" instead. Gets/Sets whether the tooltip will hide when the mouse moves away from the target element (when false), or when the mouse [enters] and moves out of the tooltip itself (when set to true).

C#
[Obsolete("This property is obsolete. Please use HideEvent=\"LeaveToolTip\" instead.")]
public bool Sticky { get; set; }
C#
protected override bool SupportsRenderingMode { get; }

Overrides: RadWebControl.SupportsRenderingMode

Get/Set the Text that will appear in the tooltip (if it should be different from the content of the 'title' attribute of the target element).

C#
[ClientControlProperty]
public string Text { get; set; }
Property Value:

Can take and properly display an HTML string. This requires that line breaks and special characters are prepared (escaped) for HTML as well.

Get/Set a title for the tooltip.

C#
[ClientControlProperty]
public string Title { get; set; }

This title is not affected by the rest of the content and is always displayed, regardless of the content source. For more details see this help article: http://www.telerik.com/help/aspnet-ajax/tooltip-content.html.

Gets or sets a value indicating whether the tooltip will open automatically when its parent [aspx] page is loaded on the client.

C#
[ClientControlProperty]
[Browsable(true)]
[Bindable(true)]
public bool VisibleOnPageLoad { get; set; }
Property Value:

The default value is false.

Get/Set the Width of the tooltip in pixels.

C#
[ClientControlProperty]
[TypeConverter(typeof(UnitConverter))]
public override Unit Width { get; set; }

Overrides: RadWebControl.Width

Methods

Causes the tooltip to open automatically when the page is loaded

C#
public void Show()