TreeView.ExpandImageUrl プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > TreeView.ExpandImageUrl プロパティの意味・解説 

TreeView.ExpandImageUrl プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

展開可能なノード インジケータカスタム イメージURL取得または設定します

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

Dim instance As TreeView
Dim value As String

value = instance.ExpandImageUrl

instance.ExpandImageUrl = value
public string ExpandImageUrl { get;
 set; }
public:
property String^ ExpandImageUrl {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_ExpandImageUrl ()

/** @property */
public void set_ExpandImageUrl (String value)
public function get ExpandImageUrl
 () : String

public function set ExpandImageUrl
 (value : String)

プロパティ
展開可能なノード表示されるカスタム イメージURL既定値空の文字列 ("") で、既定正符号 (+) のイメージ表示します

解説解説

ExpandImageUrl プロパティ使用して、展開可能なノード インジケータカスタム イメージ指定します。このイメージは、展開可能なノードの隣に表示され通常正符号 (+) です。

ShowExpandCollapse プロパティtrue設定されている場合、TreeView コントロールでは、正符号 (+)、マイナス記号 (-)、またはプレースホルダ イメージノードの隣に表示されノードそれぞれ展開可能、折りたたみ可能、または展開不能のいずれであるかを示します。ImageSet プロパティTreeViewImageSet.Custom設定してから、NoExpandImageUrl、ExpandImageUrl、および CollapseImageUrl の各プロパティカスタム イメージURL設定することにより、カスタム イメージ指定できますイメージ指定されていない場合は、既定イメージ使用されます。ノード展開インジケータを非表示にするには、ShowExpandCollapse プロパティfalse設定します

メモメモ

カスタム イメージ使用するときに TreeView コントロール内のノード適切に配置するには、NoExpandImageUrlExpandImageUrl、および CollapseImageUrl の各プロパティによって指定されすべてのイメージが同じ大きさであることを確認します

展開可能なノード インジケータカスタム イメージ使用する場合は、ExpandImageToolTip プロパティ設定してイメージツールヒント指定することも検討する必要があります

このプロパティの値はビューステート格納されます。

使用例使用例

ExpandImageUrl プロパティ使用して、展開可能なノード インジケータカスタム イメージ指定するコード例次に示します表示するコード例コントロール表示されるイメージについて、独自のイメージ指定してImageSet プロパティTreeNodeImageSet.Custom設定する必要があります

<%@ Page Language="VB" %>

<html>
  <body>
    <form runat="server">
    
      <h3>TreeView Custom Images Example</h3>
      
      <!-- Set the custom images of this
 TreeView control -->
      <!-- declaratively.                                 -->
      <asp:TreeView id="CustomTreeView"
        NoExpandImageUrl="Space.jpg"
        CollapseImageUrl="Minus.jpg"
        CollapseImageToolTip="Collapse Node"
        ExpandImageUrl="Plus.jpg"
        ExpandImageToolTip="Expand Node"
        RootNodeImageUrl="Root.jpg"
        ParentNodeImageUrl="Parent.jpg"
        LeafNodeImageUrl="Leaf.jpg" 
        ImageSet="Custom"
        runat="server">
         
        <Nodes>
        
          <asp:TreeNode Value="Home" 
            NavigateUrl="Home.aspx" 
            Text="Home"
            Target="_blank" 
            Expanded="True">
             
            <asp:TreeNode Value="Page 1" 
              NavigateUrl="Page1.aspx" 
              Text="Page 1"
              Target="_blank">
                 
              <asp:TreeNode Value="Section 1"
                ImageUrl="custom.jpg" 
                NavigateUrl="Section1.aspx" 
                Text="Section 1"
                Target="_blank">
              </asp:TreeNode>
                
            </asp:TreeNode>
            
            <asp:TreeNode Value="Page 2" 
              Selected="True" 
              NavigateUrl="Page2.aspx"
              Text="Page 2"
              Target="_blank">
            </asp:TreeNode>
            
          </asp:TreeNode>
        
        </Nodes>
        
      </asp:TreeView> 
       

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

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

<html>
  <body>
    <form runat="server">
    
      <h3>TreeView Custom Images Example</h3>
      
      <!-- Set the custom images of this TreeView control -->
      <!-- declaratively.                                 -->
      <asp:TreeView id="CustomTreeView"
        NoExpandImageUrl="Space.jpg"
        CollapseImageUrl="Minus.jpg"
        CollapseImageToolTip="Collapse Node"
        ExpandImageUrl="Plus.jpg"
        ExpandImageToolTip="Expand Node"
        RootNodeImageUrl="Root.jpg"
        ParentNodeImageUrl="Parent.jpg"
        LeafNodeImageUrl="Leaf.jpg" 
        ImageSet="Custom"
        runat="server">
         
        <Nodes>
        
          <asp:TreeNode Value="Home" 
            NavigateUrl="Home.aspx" 
            Text="Home"
            Target="_blank" 
            Expanded="True">
             
            <asp:TreeNode Value="Page 1" 
              NavigateUrl="Page1.aspx" 
              Text="Page 1"
              Target="_blank">
                 
              <asp:TreeNode Value="Section 1"
                ImageUrl="custom.jpg" 
                NavigateUrl="Section1.aspx" 
                Text="Section 1"
                Target="_blank">
              </asp:TreeNode>
                
            </asp:TreeNode>
            
            <asp:TreeNode Value="Page 2" 
              Selected="True" 
              NavigateUrl="Page2.aspx"
              Text="Page 2"
              Target="_blank">
            </asp:TreeNode>
            
          </asp:TreeNode>
        
        </Nodes>
        
      </asp:TreeView> 
       

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

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
TreeView クラス
TreeView メンバ
System.Web.UI.WebControls 名前空間
ShowExpandCollapse
ImageSet
TreeViewImageSet
TreeView.CollapseImageUrl プロパティ
NoExpandImageUrl
TreeView.ExpandImageToolTip プロパティ



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「TreeView.ExpandImageUrl プロパティ」の関連用語

TreeView.ExpandImageUrl プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



TreeView.ExpandImageUrl プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS