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

Dim instance As ListViewItem Dim value As Integer value = instance.IndentCount instance.IndentCount = value
/** @property */ public int get_IndentCount () /** @property */ public void set_IndentCount (int value)
ListViewItem のインデント幅として使用する小さいイメージの幅の数。


IndentCount プロパティを使用できるのは、項目を格納する ListView の View プロパティが Details に設定されており、ListView の SmallImageList プロパティが設定されている場合のみです。

IndentCount プロパティを設定する方法を次のコード例に示します。この例を実行するには、次のコードを Windows フォームに貼り付け、フォームのコンストラクタまたは Load のイベント処理メソッドから InitializeIndentedListViewItems を呼び出します。
Private indentedListView As ListView Private Sub InitializeIndentedListViewItems() indentedListView = New ListView() indentedListView.Width = 200 ' View must be set to Details to use IndentCount. indentedListView.View = View.Details indentedListView.Columns.Add("Indented Items", 150) ' Create an image list and add an image. Dim list As New ImageList() list.Images.Add(New Bitmap(GetType(Button), "Button.bmp")) ' SmallImageList must be set when using IndentCount. indentedListView.SmallImageList = list Dim item1 As New ListViewItem("Click", 0) item1.IndentCount = 1 Dim item2 As New ListViewItem("OK", 0) item2.IndentCount = 2 Dim item3 As New ListViewItem("Cancel", 0) item3.IndentCount = 3 indentedListView.Items.AddRange(New ListViewItem() {item1, item2, item3}) ' Add the controls to the form. Me.Controls.Add(indentedListView) End Sub 'InitializeIndentedListViewItems
ListView indentedListView; private void InitializeIndentedListViewItems() { indentedListView = new ListView(); indentedListView.Width = 200; // View must be set to Details to use IndentCount. indentedListView.View = View.Details; indentedListView.Columns.Add("Indented Items", 150); // Create an image list and add an image. ImageList list = new ImageList(); list.Images.Add(new Bitmap(typeof(Button), "Button.bmp")); // SmallImageList must be set when using IndentCount. indentedListView.SmallImageList = list; ListViewItem item1 = new ListViewItem("Click", 0); item1.IndentCount = 1; ListViewItem item2 = new ListViewItem("OK", 0); item2.IndentCount = 2; ListViewItem item3 = new ListViewItem("Cancel", 0); item3.IndentCount = 3; indentedListView.Items.AddRange(new ListViewItem[] { item1, item2, item3 }); // Add the controls to the form. this.Controls.Add(indentedListView); }

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に収録されているすべての辞書からListViewItem.IndentCount プロパティを検索する場合は、下記のリンクをクリックしてください。

- ListViewItem.IndentCount プロパティのページへのリンク