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

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

TreeView.NoExpandImageUrl プロパティ

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

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

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

Public Property NoExpandImageUrl As
 String
Dim instance As TreeView
Dim value As String

value = instance.NoExpandImageUrl

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

/** @property */
public void set_NoExpandImageUrl (String value)
public function get NoExpandImageUrl
 () : String

public function set NoExpandImageUrl
 (value : String)

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

解説解説

NoExpandImageUrl プロパティ使用して、展開不能なノード インジケータカスタム イメージ指定します。展開不能なノード インジケータ イメージ (スペーサ) は、葉ノード親ノードまたはルート ノード揃えて配置するために、展開可能および折りたたみ可能なノード インジケータ代わりに葉ノードの隣に表示されます。

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

メモメモ

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

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

使用例使用例

NoExpandImageUrl プロパティ使用して、展開不能なノード インジケータカスタム イメージ指定するコード例次に示します表示するコード例コントロール表示されるイメージについて、独自のイメージ指定して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
TreeView.ImageSet プロパティ
TreeViewImageSet
TreeView.CollapseImageUrl プロパティ
TreeView.ExpandImageUrl プロパティ



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

辞書ショートカット

すべての辞書の索引

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

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

   

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



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

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

©2024 GRAS Group, Inc.RSS