SHOWTOOLTIP Attribute | ShowToolTip Property

Sets or retrieves a System.Boolean that indicates whether to show a default ToolTip for each child node.

Syntax

ASP <tagPrefix:TREEVIEW SHOWTOOLTIP = bValue ... >
Script [ bValue = ] TREEVIEW.ShowToolTip

Possible Values

tagPrefix Required. The element prefix associated with the WebControls namespace (Microsoft.Web.UI.WebControls). A TagPrefix is defined using the directive.
bValue System.Boolean that specifies or receives a value that indicates whether to show a default ToolTip for each child node.
trueDefault. Show the default ToolTip.
falseDo not show the default ToolTip. See remarks for more information.

The property is read/write. The property has a default value of true.

Remarks

The default ToolTip, Use +/- to expand/collapse , appears over each child node when the mouse moves over it and the property is set to true on the parent TreeNode. This property is inherited by each child. Setting this property to false on a child TreeNode whose parent property is set to true, creates child nodes without the ToolTip.

Examples

This sample demonstrates that by setting ShowToolTip to true on a parent TreeNode, the default ToolTip appears when the mouse moves over the node.

<%@ Import Namespace="Microsoft.Web.UI.WebControls" %>
<%@ Import Namespace="System.Drawing" %>
<%@ Register TagPrefix="myTree" 
Namespace="Microsoft.Web.UI.WebControls" 
Assembly="Microsoft.Web.UI.WebControls, Version=1.0.2.226, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
    
<HTML>
<BODY>
<FORM ID="debug" runat="server" >
    <myTree:TREEVIEW runat="server" id="treeview1"
        systemimagespath="treeimages" selectexpands=true >
  
        <myTree:TREENODE SHOWTOOLTIP=true text="root1" expanded=true >
            <myTree:TREENODE text="document1" />
            <myTree:TREENODE text="folder1" >
                <myTree:TREENODE text="document2"  />
            </myTree:TREENODE>
      
            <myTree:TREENODE text="document3" />
        </myTree:TREENODE>
  
        <myTree:TREENODE text="root2" />
    </myTree:TREEVIEW>
</FORM>
</BODY>
</HTML>

Property Information

Applies To

TREEVIEW

See Also

Internet Explorer WebControls, About the TreeView WebControl