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

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

TreeView.StateImageList プロパティ

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

TreeView およびそのノードの状態を示すために使用するイメージ リスト取得または設定します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Dim instance As TreeView
Dim value As ImageList

value = instance.StateImageList

instance.StateImageList = value
public ImageList StateImageList { get; set;
 }
/** @property */
public ImageList get_StateImageList ()

/** @property */
public void set_StateImageList (ImageList value)
public function get StateImageList
 () : ImageList

public function set StateImageList
 (value : ImageList)

プロパティ
TreeView およびそのノードの状態を示すために使用する ImageList

解説解説

TreeNode の状態を示すには、StateImageList プロパティと共に、各 TreeNode の StateImageKey プロパティまたは StateImageIndex プロパティ設定します

TreeView表示される状態イメージは常に 16 x 16 ピクセルであり、StateImageListImageSize プロパティ設定しても、イメージ表示方法影響はありません。

TreeView の CheckBoxes プロパティtrue設定されており、かつ StateImageList プロパティ設定されている場合TreeView含まれるTreeNode には、チェックされていない状態であるかチェックされた状態であるかを示すために、StateImageList最初イメージ2 番目のイメージそれぞれ表示されます。デザイン時に状態イメージ設定されていないノードの状態イメージ表示されないようにするには、TreeViewノード追加する前にStateImageList プロパティ設定する必要があります

使用例使用例

StateImageList プロパティコード例次に示します。この例を実行するには、コードWindows フォーム貼り付けフォームコンストラクタまたは Loadイベント処理メソッドから、InitializeCheckTreeView 呼び出します。

Private checkTreeView As TreeView

Private Sub InitializeCheckTreeView() 
    checkTreeView = New TreeView()
    
    ' Show check boxes for the TreeView.
    checkTreeView.CheckBoxes = True
    
    ' Create the StateImageList and add two images.
    checkTreeView.StateImageList = New ImageList()
    checkTreeView.StateImageList.Images.Add(SystemIcons.Question)
    checkTreeView.StateImageList.Images.Add(SystemIcons.Exclamation)
    
    ' Add some nodes to the TreeView and the TreeView to the form.
    checkTreeView.Nodes.Add("Node1")
    checkTreeView.Nodes.Add("Node2")
    Me.Controls.Add(checkTreeView)

End Sub
TreeView checkTreeView;
private void InitializeCheckTreeView()
{
    checkTreeView = new TreeView();
    
    // Show check boxes for the TreeView. This
    // will cause the StateImageList to be used.
    checkTreeView.CheckBoxes = true;

    // Create the StateImageList and add two images.
    checkTreeView.StateImageList = new ImageList();
    checkTreeView.StateImageList.Images.Add(SystemIcons.Question);
    checkTreeView.StateImageList.Images.Add(SystemIcons.Exclamation);
    
    // Add some nodes to the TreeView and the TreeView to the form.
    checkTreeView.Nodes.Add("Node1");
    checkTreeView.Nodes.Add("Node2");
    this.Controls.Add(checkTreeView);
}
    TreeView^ checkTreeView;
private:
    void InitializeCheckTreeView()
    {
        checkTreeView = gcnew TreeView();

        // Show check boxes for the TreeView. This
        // will cause the StateImageList to be used.
        checkTreeView->CheckBoxes = true;

        // Create the StateImageList and add two images.
        checkTreeView->StateImageList = gcnew ImageList();
        checkTreeView->StateImageList->Images->Add(SystemIcons::Question);
        checkTreeView->StateImageList->Images->Add(SystemIcons::Exclamation);

        // Add some nodes to the TreeView and the TreeView to the form.
        checkTreeView->Nodes->Add("Node1");
        checkTreeView->Nodes->Add("Node2");
        this->Controls->Add(checkTreeView);
    }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からTreeView.StateImageList プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からTreeView.StateImageList プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からTreeView.StateImageList プロパティ を検索

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS