TreeView.StateImageList プロパティ
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Dim instance As TreeView Dim value As ImageList value = instance.StateImageList instance.StateImageList = value
/** @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 ピクセルであり、StateImageList の ImageSize プロパティを設定しても、イメージの表示方法に影響はありません。
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); }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からTreeView.StateImageList プロパティを検索する場合は、下記のリンクをクリックしてください。

- TreeView.StateImageList プロパティのページへのリンク