Back to Devexpress

TreeViewNode.ToolTip Property

aspnet-devexpress-dot-web-dot-treeviewnode-36801492.md

latest2.3 KB
Original Source

TreeViewNode.ToolTip Property

Gets or sets the current node’s tooltip text.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue("")]
public string ToolTip { get; set; }
vb
<DefaultValue("")>
Public Property ToolTip As String

Property Value

TypeDefaultDescription
StringString.Empty

A string which specifies the text content of the current node’s tooltip.

|

Remarks

Use the ToolTip property to define a tooltip text for an individual node object. If a string is assigned to a node’s ToolTip property, the tooltip is shown whenever the mouse cursor pauses over the node. If the ToolTip property is set to an empty string (String.Empty), the tooltip is never shown.

Example

The code below adds a node with the default settings to the ASPxTreeView’s child collection, and then initializes its main properties.

The image below shows the result.

csharp
using DevExpress.Web.ASPxTreeView;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e) {
        TreeViewNode node = ASPxTreeView1.Nodes.Add();
        node.Text = "Home";
        node.Image.Url = "~/Images/Home.png";
        node.Name = "Home page";
        node.NavigateUrl = "https://www.devexpress.com/";
        node.Target = "_blank";
        node.ToolTip = "DevEx Home Page";
    }
}
aspx
<dx:ASPxTreeView ID="ASPxTreeView1" runat="server">
</dx:ASPxTreeView>

See Also

Tree View

TreeViewNode Class

TreeViewNode Members

DevExpress.Web Namespace