TreeNode.ToolTip 속성

정의

노드에 대한 도구 설명 텍스트를 가져오거나 설정합니다.

public:
 property System::String ^ ToolTip { System::String ^ get(); void set(System::String ^ value); };
public string ToolTip { get; set; }
member this.ToolTip : string with get, set
Public Property ToolTip As String

속성 값

노드에 대한 도구 설명 텍스트입니다. 기본값은 빈 문자열("")입니다.

예제

다음 코드 예제를 사용 하는 방법에 설명 합니다 ToolTip 의 노드에 대 한 도구 설명을 제공 하는 속성을 TreeView 컨트롤.


<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>TreeNode ToolTip Example</title>
</head>
<body>
    <form id="form1" runat="server">
    
      <h3>TreeNode ToolTip Example</h3>
      
      <h5>Position the mouse pointer over a node.</h5>
    
      <asp:TreeView id="LinksTreeView"
        Font-Names= "Arial"
        ForeColor="Blue"
        ExpandDepth="2"
        runat="server">
         
        <LevelStyles>
        
          <asp:TreeNodeStyle ChildNodesPadding="10" 
            Font-Bold="true" 
            Font-Size="12pt" 
            ForeColor="DarkGreen"/>
          <asp:TreeNodeStyle ChildNodesPadding="5" 
            Font-Bold="true" 
            Font-Size="10pt"/>
          <asp:TreeNodeStyle ChildNodesPadding="5" 
            Font-UnderLine="true" 
            Font-Size="10pt"/>
          <asp:TreeNodeStyle ChildNodesPadding="10" 
            Font-Size="8pt"/>
             
        </LevelStyles>
         
        <Nodes>
        
          <asp:TreeNode Text="Table of Contents"
            ToolTip="Table of Contents Description">
             
            <asp:TreeNode Text="Chapter One"
               ToolTip="Chapter One Description">
            
              <asp:TreeNode Text="Section 1.0"
                ToolTip="Section 1.0 Description">
              
                <asp:TreeNode Text="Topic 1.0.1"/>
                <asp:TreeNode Text="Topic 1.0.2"/>
                <asp:TreeNode Text="Topic 1.0.3"/>
              
              </asp:TreeNode>
              
              <asp:TreeNode Text="Section 1.1"
                ToolTip="Section 1.1 Description">
              
                <asp:TreeNode Text="Topic 1.1.1"/>
                <asp:TreeNode Text="Topic 1.1.2"/>
                <asp:TreeNode Text="Topic 1.1.3"/>
                <asp:TreeNode Text="Topic 1.1.4"/>
              
              </asp:TreeNode>
            
            </asp:TreeNode>
            
            <asp:TreeNode Text="Chapter Two"
              ToolTip="Chapter Two Description">
            
              <asp:TreeNode Text="Section 2.0"
                ToolTip="Section 2.0 Description">
              
                <asp:TreeNode Text="Topic 2.0.1"/>
                <asp:TreeNode Text="Topic 2.0.2"/>
              
              </asp:TreeNode>
            
            </asp:TreeNode>
            
          </asp:TreeNode>
          
          <asp:TreeNode Text="Appendix A" 
            ToolTip="Appendix A Description"/>
          <asp:TreeNode Text="Appendix B" 
            ToolTip="Appendix B Description"/>
          <asp:TreeNode Text="Appendix C" 
            ToolTip="Appendix C Description"/>
        
        </Nodes>
        
      </asp:TreeView>

    </form>
  </body>
</html>

<%@ Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>TreeNode ToolTip Example</title>
</head>
<body>
    <form id="form1" runat="server">
    
      <h3>TreeNode ToolTip Example</h3>
      
      <h5>Position the mouse pointer over a node.</h5>
    
      <asp:TreeView id="LinksTreeView"
        Font-Names= "Arial"
        ForeColor="Blue"
        ExpandDepth="2"
        runat="server">
         
        <LevelStyles>
        
          <asp:TreeNodeStyle ChildNodesPadding="10" 
            Font-Bold="true" 
            Font-Size="12pt" 
            ForeColor="DarkGreen"/>
          <asp:TreeNodeStyle ChildNodesPadding="5" 
            Font-Bold="true" 
            Font-Size="10pt"/>
          <asp:TreeNodeStyle ChildNodesPadding="5" 
            Font-UnderLine="true" 
            Font-Size="10pt"/>
          <asp:TreeNodeStyle ChildNodesPadding="10" 
            Font-Size="8pt"/>
             
        </LevelStyles>
         
        <Nodes>
        
          <asp:TreeNode Text="Table of Contents"
            ToolTip="Table of Contents Description">
             
            <asp:TreeNode Text="Chapter One"
               ToolTip="Chapter One Description">
            
              <asp:TreeNode Text="Section 1.0"
                ToolTip="Section 1.0 Description">
              
                <asp:TreeNode Text="Topic 1.0.1"/>
                <asp:TreeNode Text="Topic 1.0.2"/>
                <asp:TreeNode Text="Topic 1.0.3"/>
              
              </asp:TreeNode>
              
              <asp:TreeNode Text="Section 1.1"
                ToolTip="Section 1.1 Description">
              
                <asp:TreeNode Text="Topic 1.1.1"/>
                <asp:TreeNode Text="Topic 1.1.2"/>
                <asp:TreeNode Text="Topic 1.1.3"/>
                <asp:TreeNode Text="Topic 1.1.4"/>
              
              </asp:TreeNode>
            
            </asp:TreeNode>
            
            <asp:TreeNode Text="Chapter Two"
              ToolTip="Chapter Two Description">
            
              <asp:TreeNode Text="Section 2.0"
                ToolTip="Section 2.0 Description">
              
                <asp:TreeNode Text="Topic 2.0.1"/>
                <asp:TreeNode Text="Topic 2.0.2"/>
              
              </asp:TreeNode>
            
            </asp:TreeNode>
            
          </asp:TreeNode>
          
          <asp:TreeNode Text="Appendix A" 
            ToolTip="Appendix A Description"/>
          <asp:TreeNode Text="Appendix B" 
            ToolTip="Appendix B Description"/>
          <asp:TreeNode Text="Appendix C" 
            ToolTip="Appendix C Description"/>
        
        </Nodes>
        
      </asp:TreeView>

    </form>
  </body>
</html>

설명

사용 된 ToolTip 노드에 대 한 도구 설명 텍스트를 지정 하는 속성입니다. 도구 설명 텍스트를 노드 위에 마우스 포인터가 있을 때 표시 됩니다.

이 속성의 값으로 설정 된 경우 디자이너 도구를 사용 하 여 리소스 파일에 자동으로 저장 될 수 있습니다. 자세한 내용은 LocalizableAttribute 하 고 전역화 및 지역화합니다.

적용 대상

추가 정보