ListView.ColumnHeaderCollectionとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ListView.ColumnHeaderCollectionの意味・解説 

ListView.ColumnHeaderCollection クラス

ListView コントロールの列ヘッダーのコレクションを表します。

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

Public Class ColumnHeaderCollection
    Implements IList, ICollection, IEnumerable
Dim instance As ColumnHeaderCollection
public class ColumnHeaderCollection : IList,
 ICollection, IEnumerable
public ref class ColumnHeaderCollection : IList,
 ICollection, IEnumerable
public class ColumnHeaderCollection implements
 IList, ICollection, 
    IEnumerable
public class ColumnHeaderCollection implements
 IList, ICollection, 
    IEnumerable
解説解説

ListView.ColumnHeaderCollection クラスは、View プロパティが Details に設定されているときに ListView コントロールに表示される列ヘッダーを格納します。ListView.ColumnHeaderCollection は、列に対して表示するテキスト、および列を表示するときの ListView コントロールでの列ヘッダーの表示方法を定義する ColumnHeader オブジェクトを格納します。ListView で列を表示する場合、項目とそのサブ項目は独自の列に表示されます。サブ項目のデータが表示される列を指定するには、ListViewItem.ListViewSubItemCollection クラスのトピックを参照してください。

列ヘッダーをコレクションに追加するには、いくつか方法があります。Add メソッドを使用して、1 つの列ヘッダーをコレクションに追加します。複数の列ヘッダーをコレクションに追加するには、ColumnHeader オブジェクトの配列を作成し、その配列を AddRange メソッドに渡します。コレクション内の特定の位置に列ヘッダーを挿入するには、Insert メソッドを使用します。列ヘッダーを削除するには、Remove メソッドか、コレクション内の列ヘッダーの位置が判明している場合は RemoveAt メソッドを使用できます。一度に 1 つの列ヘッダーしか削除できない Remove メソッドを使用する代わりに、Clear メソッドを使用すると、コレクションからすべての列ヘッダーを削除できます。

列ヘッダーを追加および削除するメソッドやプロパティの他に、ListView.ColumnHeaderCollection は、コレクション内で列ヘッダーを検索するメソッドも提供します。Contains メソッドを使用すると、列ヘッダーがコレクションのメンバかどうかを確認できます。コレクション内に列ヘッダーがあることが判明している場合は、IndexOf メソッドを使用して、その列ヘッダーがコレクションのどこに位置しているかを確認できます。

メモメモ

すべての列の幅の合計が 32,768 ピクセルを超えると、予期しない動作が発生する場合があります。

使用例使用例

ListView コントロールの列がクリックされたときに手動で項目を並べ替える ListView コントロールが配置されたフォームを作成するコード例を次に示します。この例では、ListViewItem の比較を実行する System.Collections.IComparer インターフェイスを実装するクラスを ListViewItemComparer という名前で定義します。また、ListViewItemComparer のインスタンスを作成し、これを使用して ListView コントロールの ListViewItemSorter プロパティを設定します。ColumnClick イベント ハンドラでの Sort メソッド呼び出しでは、ListViewItemComparer に定義されているメソッドを使用し、クリックされた列を基準に、項目の並べ替えを実行します。

Imports System
Imports System.Windows.Forms
Imports System.Drawing
Imports System.Collections


Namespace ListViewSortFormNamespace

    Public Class ListViewSortForm
        Inherits Form

        Private listView1 As ListView

        Public Sub New()
            ' Create ListView items to add to the control.
            Dim listViewItem1 As New
 ListViewItem(New String() {"Banana",
 "a", "b", "c"}, -1, Color.Empty, Color.Yellow, Nothing)
            Dim listViewItem2 As New
 ListViewItem(New String() {"Cherry",
 "v", "g", "t"}, -1, Color.Empty, Color.Red, New Font("Microsoft
 Sans Serif", 8.25F, FontStyle.Regular, GraphicsUnit.Point, CType(0, System.Byte)))
            Dim listViewItem3 As New
 ListViewItem(New String() {"Apple",
 "h", "j", "n"}, -1, Color.Empty, Color.Lime, Nothing)
            Dim listViewItem4 As New
 ListViewItem(New String() {"Pear",
 "y", "u", "i"}, -1, Color.Empty, Color.FromArgb(CType(192, System.Byte), CType(128,
 System.Byte), CType(156, System.Byte)), Nothing)

            'Initialize the ListView control and add columns to it.
            Me.listView1 = New ListView

            ' Set the initial sorting type for the ListView.
            Me.listView1.Sorting = SortOrder.None
            ' Disable automatic sorting to enable manual sorting.
            Me.listView1.View = View.Details
            ' Add columns and set their text.
            Me.listView1.Columns.Add(New ColumnHeader)
            Me.listView1.Columns(0).Text = "Column
 1"
            Me.listView1.Columns(0).Width = 100
            listView1.Columns.Add(New ColumnHeader)
            listView1.Columns(1).Text = "Column 2"
            listView1.Columns.Add(New ColumnHeader)
            listView1.Columns(2).Text = "Column 3"
            listView1.Columns.Add(New ColumnHeader)
            listView1.Columns(3).Text = "Column 4"
            ' Suspend control logic until form is done configuring form.
            Me.SuspendLayout()
            ' Add Items to the ListView control.
            Me.listView1.Items.AddRange(New
 ListViewItem() {listViewItem1, listViewItem2, listViewItem3, listViewItem4})
            ' Set the location and size of the ListView control.
            Me.listView1.Location = New Point(10,
 10)
            Me.listView1.Name = "listView1"
            Me.listView1.Size = New Size(300,
 100)
            Me.listView1.TabIndex = 0
            ' Enable editing of the items in the ListView.
            Me.listView1.LabelEdit = True
            ' Connect the ListView.ColumnClick event to the ColumnClick
 event handler.
            AddHandler Me.listView1.ColumnClick,
 AddressOf ColumnClick

            ' Initialize the form.
            Me.ClientSize = New Size(400, 400)
            Me.Controls.AddRange(New Control()
 {Me.listView1})
            Me.Name = "ListViewSortForm"
            Me.Text = "Sorted ListView Control"
            ' Resume layout of the form.
            Me.ResumeLayout(False)
        End Sub 'New


        ' ColumnClick event handler.
        Private Sub ColumnClick(ByVal
 o As Object, ByVal e As
 ColumnClickEventArgs)
            ' Set the ListViewItemSorter property to a new ListViewItemComparer
 
            ' object. Setting this property immediately sorts the 
            ' ListView using the ListViewItemComparer object.
            Me.listView1.ListViewItemSorter = New
 ListViewItemComparer(e.Column)
        End Sub

    End Class

    ' Implements the manual sorting of items by columns.
    Class ListViewItemComparer
        Implements IComparer

        Private col As Integer

        Public Sub New()
            col = 0
        End Sub

        Public Sub New(ByVal
 column As Integer)
            col = column
        End Sub

        Public Function Compare(ByVal
 x As Object, ByVal y As
 Object) As Integer _
           Implements IComparer.Compare
            Return [String].Compare(CType(x, ListViewItem).SubItems(col).Text,
 CType(y, ListViewItem).SubItems(col).Text)
        End Function
    End Class
End Namespace
using System;
using System.Windows.Forms;
using System.Drawing;
using System.Collections;

namespace ListViewSortFormNamespace
{
    
   
    public class ListViewSortForm : Form
    {
        private ListView listView1;
       
        public ListViewSortForm()
        {
            // Create ListView items to add to the control.
            ListViewItem listViewItem1 = new ListViewItem(new
 string[] {"Banana","a","b","c"},
 -1, Color.Empty, Color.Yellow, null);
            ListViewItem listViewItem2 = new ListViewItem(new
 string[] {"Cherry","v","g","t"},
 -1, Color.Empty, Color.Red, new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular, GraphicsUnit.Point, ((System.Byte)(0))));
            ListViewItem listViewItem3 = new ListViewItem(new
 string[] {"Apple","h","j","n"},
 -1, Color.Empty, Color.Lime, null);
            ListViewItem listViewItem4 = new ListViewItem(new
 string[] {"Pear","y","u","i"},
 -1, Color.Empty, Color.FromArgb(((System.Byte)(192)), ((System.Byte)(128)), ((System.Byte)(156))), null);
     
            //Initialize the ListView control and add columns to it.
            this.listView1 = new ListView();

            // Set the initial sorting type for the ListView.
            this.listView1.Sorting = SortOrder.None;
            // Disable automatic sorting to enable manual sorting.
            this.listView1.View = View.Details;
            // Add columns and set their text.
            this.listView1.Columns.Add(new
 ColumnHeader());
            this.listView1.Columns[0].Text = "Column 1";
            this.listView1.Columns[0].Width = 100;
            listView1.Columns.Add(new ColumnHeader());
            listView1.Columns[1].Text = "Column 2";
            listView1.Columns.Add(new ColumnHeader());
            listView1.Columns[2].Text = "Column 3";
            listView1.Columns.Add(new ColumnHeader());
            listView1.Columns[3].Text = "Column 4";
            // Suspend control logic until form is done configuring
 form.
            this.SuspendLayout();
            // Add Items to the ListView control.
            this.listView1.Items.AddRange(new
 ListViewItem[] {listViewItem1,
                listViewItem2,
                listViewItem3,
                listViewItem4});
            // Set the location and size of the ListView control.
            this.listView1.Location = new Point(10,
 10);
            this.listView1.Name = "listView1";
            this.listView1.Size = new Size(300,
 100);
            this.listView1.TabIndex = 0;
            // Enable editing of the items in the ListView.
            this.listView1.LabelEdit = true;
            // Connect the ListView.ColumnClick event to the ColumnClick
 event handler.
            this.listView1.ColumnClick += new
 ColumnClickEventHandler(ColumnClick);
               
            // Initialize the form.
            this.ClientSize = new Size(400,
 400);
            this.Controls.AddRange(new Control[]
 {this.listView1});
            this.Name = "ListViewSortForm";
            this.Text = "Sorted ListView Control";
            // Resume layout of the form.
            this.ResumeLayout(false);
        }
        
    
        // ColumnClick event handler.
        private void ColumnClick(object o,
 ColumnClickEventArgs e)
        {
            // Set the ListViewItemSorter property to a new ListViewItemComparer
 
            // object. Setting this property immediately sorts the 
            // ListView using the ListViewItemComparer object.
            this.listView1.ListViewItemSorter = new
 ListViewItemComparer(e.Column);
        }

        [System.STAThreadAttribute()]
        public static void
 Main()
        {
            Application.Run(new ListViewSortForm());
        }

    }

    // Implements the manual sorting of items by columns.
    class ListViewItemComparer : IComparer
    {
        private int col;
        public ListViewItemComparer()
        {
            col = 0;
        }
        public ListViewItemComparer(int column)
        {
            col = column;
        }
        public int Compare(object x, object
 y)
        {
            return String.Compare(((ListViewItem)x).SubItems[col].Text,
 ((ListViewItem)y).SubItems[col].Text);
        }
    }

}
#using <System.dll>
#using <System.Drawing.dll>
#using <System.Windows.Forms.dll>

using namespace System;
using namespace System::Windows::Forms;
using namespace System::Drawing;
using namespace System::Collections;

// Implements the manual sorting of items by columns.
ref class ListViewItemComparer: public IComparer
{
private:
   int col;

public:
   ListViewItemComparer()
   {
      col = 0;
   }

   ListViewItemComparer( int column )
   {
      col = column;
   }

   virtual int Compare( Object^ x, Object^ y )
   {
      return String::Compare( (dynamic_cast<ListViewItem^>(x))->SubItems[
 col ]->Text,
                              (dynamic_cast<ListViewItem^>(y))->SubItems[
 col ]->Text );
   }
};

public ref class ListViewSortForm: public
 Form
{
private:
   ListView^ listView1;

public:
   ListViewSortForm()
   {
      // Create ListView items to add to the control.
      array<String^>^temp0 = {"Banana","a","b"
,"c"};
      ListViewItem^ listViewItem1 = gcnew ListViewItem( temp0,-1,Color::Empty,Color::Yellow,nullptr
 );
      array<String^>^temp1 = {"Cherry","v","g"
,"t"};
      ListViewItem^ listViewItem2 = gcnew ListViewItem( temp1,-1,Color::Empty,Color::Red
,
                 gcnew System::Drawing::Font( "Microsoft Sans Serif",8.25F,FontStyle::Regular,GraphicsUnit::Point,0
 ) );
      array<String^>^temp2 = {"Apple","h","j"
,"n"};
      ListViewItem^ listViewItem3 = gcnew ListViewItem( temp2,-1,Color::Empty,Color::Lime,nullptr
 );
      array<String^>^temp3 = {"Pear","y","u"
,"i"};
      ListViewItem^ listViewItem4 = gcnew ListViewItem( temp3,-1,Color::Empty,Color::FromArgb(
 192, 128, 156 ),nullptr );

      //Initialize the ListView control and add columns to it.
      this->listView1 = gcnew ListView;

      // Set the initial sorting type for the ListView.
      this->listView1->Sorting = SortOrder::None;

      // Disable automatic sorting to enable manual sorting.
      this->listView1->View = View::Details;

      // Add columns and set their text.
      this->listView1->Columns->Add( gcnew ColumnHeader
 );
      this->listView1->Columns[ 0 ]->Text = "Column
 1";
      this->listView1->Columns[ 0 ]->Width = 100;
      listView1->Columns->Add( gcnew ColumnHeader );
      listView1->Columns[ 1 ]->Text = "Column 2";
      listView1->Columns->Add( gcnew ColumnHeader );
      listView1->Columns[ 2 ]->Text = "Column 3";
      listView1->Columns->Add( gcnew ColumnHeader );
      listView1->Columns[ 3 ]->Text = "Column 4";

      // Suspend control logic until form is done configuring form.
      this->SuspendLayout();

      // Add Items to the ListView control.
      array<ListViewItem^>^temp4 = {listViewItem1,listViewItem2,listViewItem3
,listViewItem4};
      this->listView1->Items->AddRange( temp4 );

      // Set the location and size of the ListView control.
      this->listView1->Location = Point(10,10);
      this->listView1->Name = "listView1";
      this->listView1->Size = System::Drawing::Size( 300,
 100 );
      this->listView1->TabIndex = 0;

      // Enable editing of the items in the ListView.
      this->listView1->LabelEdit = true;

      // Connect the ListView::ColumnClick event to the ColumnClick
 event handler.
      this->listView1->ColumnClick += gcnew ColumnClickEventHandler(
 this, &ListViewSortForm::ColumnClick );

      // Initialize the form.
      this->ClientSize = System::Drawing::Size( 400, 400 );
      array<Control^>^temp5 = {this->listView1};
      this->Controls->AddRange( temp5 );
      this->Name = "ListViewSortForm";
      this->Text = "Sorted ListView Control";

      // Resume lay[Out] of* the form.
      this->ResumeLayout( false );
   }

private:

   // ColumnClick event handler.
   void ColumnClick( Object^ /*o*/, ColumnClickEventArgs^ e )
   {
      // Set the ListViewItemSorter property to a new ListViewItemComparer
 
      // object. Setting this property immediately sorts the 
      // ListView using the ListViewItemComparer object.
      this->listView1->ListViewItemSorter = gcnew ListViewItemComparer(
 e->Column );
   }
};

[System::STAThreadAttribute]
int main()
{
   Application::Run( gcnew ListViewSortForm );
}
package ListViewSortFormNamespace;

import System.*;
import System.Windows.Forms.*;
import System.Drawing.*;
import System.Collections.*;

public class ListViewSortForm extends Form
{
    private ListView listView1;

    public ListViewSortForm()
    {
        // Create ListView items to add to the control.
        ListViewItem listViewItem1 = new ListViewItem(new
 String[] { "Banana", 
            "a", "b", "c" }, -1, Color.Empty, Color.get_Yellow(),
 null);
        ListViewItem listViewItem2 = new ListViewItem(new
 String[] { "Cherry", 
            "v", "g", "t" }, -1, Color.Empty, Color.get_Red(),
 
            new Font("Microsoft Sans Serif", (float)8.25,
 FontStyle.Regular, 
            GraphicsUnit.Point, (ubyte)0));
        ListViewItem listViewItem3 = new ListViewItem(new
 String[] { "Apple", 
            "h", "j", "n" }, -1, Color.Empty, Color.get_Lime(),
 null);
        ListViewItem listViewItem4 = new ListViewItem(new
 String[] { "Pear", 
            "y", "u", "i" }, -1, Color.Empty, Color.FromArgb(192,
 128, 156), 
            null);

        //Initialize the ListView control and add columns to it.
        this.listView1 = new ListView();

        // Set the initial sorting type for the ListView.
        this.listView1.set_Sorting(SortOrder.None);

        // Disable automatic sorting to enable manual sorting.
        this.listView1.set_View(View.Details);

        // Add columns and set their text.
        this.listView1.get_Columns().Add(new
 ColumnHeader());
        this.listView1.get_Columns().get_Item(0).set_Text("Column
 1");
        this.listView1.get_Columns().get_Item(0).set_Width(100);
        listView1.get_Columns().Add(new ColumnHeader());
        listView1.get_Columns().get_Item(1).set_Text("Column 2");
        listView1.get_Columns().Add(new ColumnHeader());
        listView1.get_Columns().get_Item(2).set_Text("Column 3");
        listView1.get_Columns().Add(new ColumnHeader());
        listView1.get_Columns().get_Item(3).set_Text("Column 4");

        // Suspend control logic until form is done configuring form.
        this.SuspendLayout();

        // Add Items to the ListView control.
        this.listView1.get_Items().AddRange(new
 ListViewItem[] { listViewItem1,
            listViewItem2, listViewItem3, listViewItem4 });

        // Set the location and size of the ListView control.
        this.listView1.set_Location(new Point(10,
 10));
        this.listView1.set_Name("listView1");
        this.listView1.set_Size(new Size(300,
 100));
        this.listView1.set_TabIndex(0);

        // Enable editing of the items in the ListView.
        this.listView1.set_LabelEdit(true);

        // Connect the ListView.ColumnClick event to the 
        // ColumnClick event handler.
        this.listView1.add_ColumnClick(new
 ColumnClickEventHandler(ColumnClick));

        // Initialize the form.
        this.set_ClientSize(new Size(400, 400));
        this.get_Controls().AddRange(new Control[]
 { this.listView1 });
        this.set_Name("ListViewSortForm");
        this.set_Text("Sorted ListView Control");

        // Resume layout of the form.
        this.ResumeLayout(false);
    } //ListViewSortForm

    // ColumnClick event handler.
    private void ColumnClick(Object o, ColumnClickEventArgs
 e)
    {
        // Set the ListViewItemSorter property to a new ListViewItemComparer
 
        // object. Setting this property immediately sorts the 
        // ListView using the ListViewItemComparer object.
        this.listView1.set_ListViewItemSorter(
            new ListViewItemComparer(e.get_Column()));
    } //ColumnClick

    /** @attribute System.STAThreadAttribute()
     */
    public static void main(String[]
 args)
    {
        Application.Run(new ListViewSortForm());
    } //main
} //ListViewSortForm

// Implements the manual sorting of items by columns.
class ListViewItemComparer implements IComparer
{
    private int col;

    public ListViewItemComparer()
    {
        col = 0;
    } //ListViewItemComparer

    public ListViewItemComparer(int column)
    {
        col = column;
    } //ListViewItemComparer

    public int Compare(Object x, Object y)
    {
        return String.Compare(
            ((ListViewItem)x).get_SubItems().get_Item(col).get_Text(),
            ((ListViewItem)y).get_SubItems().get_Item(col).get_Text());
    } //Compare
} //ListViewItemComparer
継承階層継承階層
System.Object
  System.Windows.Forms.ListView.ColumnHeaderCollection
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

ListView.ColumnHeaderCollection コンストラクタ

ListView.ColumnHeaderCollection クラスの新しいインスタンスを初期化します。

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

Dim owner As ListView

Dim instance As New ColumnHeaderCollection(owner)
public ColumnHeaderCollection (
    ListView owner
)
public:
ColumnHeaderCollection (
    ListView^ owner
)
public ColumnHeaderCollection (
    ListView owner
)
public function ColumnHeaderCollection (
    owner : ListView
)

パラメータ

owner

コレクションを所有している ListView。

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ListView.ColumnHeaderCollection クラス
ListView.ColumnHeaderCollection メンバ
System.Windows.Forms 名前空間

ListView.ColumnHeaderCollection プロパティ


ListView.ColumnHeaderCollection メソッド


パブリック メソッドパブリック メソッド

( プロテクト メソッド も参照)
  名前 説明
パブリック メソッド Add オーバーロードされます。 列ヘッダーをコレクションに追加します。
パブリック メソッド AddRange 列ヘッダーの配列をコレクションに追加します。
パブリック メソッド Clear コレクションからすべての列ヘッダーを削除します。
パブリック メソッド Contains 指定した列ヘッダーがコレクション内にあるかどうかを判断します。
パブリック メソッド ContainsKey 指定したキーを持つ列がコレクション内に格納されているかどうかを確認します。
パブリック メソッド Equals  オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。)
パブリック メソッド GetEnumerator 列ヘッダーのコレクションを反復処理するために使用する列挙子を返します。
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。)
パブリック メソッド GetType  現在のインスタンスの Type を取得します。 ( Object から継承されます。)
パブリック メソッド IndexOf 指定した列ヘッダーのコレクション内のインデックスを返します。
パブリック メソッド IndexOfKey 指定したキーを持つ列のインデックスを確認します。
パブリック メソッド Insert オーバーロードされます。 コレクション内の指定したインデックス位置に、列ヘッダーを挿入します。
パブリック メソッド ReferenceEquals  指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。)
パブリック メソッド Remove 指定した列ヘッダーをコレクションから削除します。
パブリック メソッド RemoveAt コレクション内の指定されたインデックスにある列ヘッダーを削除します。
パブリック メソッド RemoveByKey 指定したキーを持つ列をコレクションから削除します。
パブリック メソッド ToString  現在の Object を表す String を返します。 ( Object から継承されます。)
プロテクト メソッドプロテクト メソッド
明示的インターフェイスの実装明示的インターフェイスの実装
  名前 説明
インターフェイスの明示的な実装 System.Collections.ICollection.CopyTo 特定の配列インデックスを開始位置として、配列に ListView.ColumnHeaderCollection 内の ColumnHeader オブジェクトをコピーします。
インターフェイスの明示的な実装 System.Collections.IList.Add ColumnHeader を ListView に追加します。
インターフェイスの明示的な実装 System.Collections.IList.Contains 指定した列ヘッダーがコレクション内にあるかどうかを判断します。
インターフェイスの明示的な実装 System.Collections.IList.IndexOf 指定した列ヘッダーのコレクション内のインデックスを返します。
インターフェイスの明示的な実装 System.Collections.IList.Insert コレクション内の指定したインデックス位置に、既存の列ヘッダーを挿入します。
インターフェイスの明示的な実装 System.Collections.IList.Remove 指定した列ヘッダーをコレクションから削除します。
参照参照

関連項目

ListView.ColumnHeaderCollection クラス
System.Windows.Forms 名前空間

ListView.ColumnHeaderCollection メンバ

ListView コントロールの列ヘッダーのコレクションを表します。

ListView.ColumnHeaderCollection データ型で公開されるメンバを以下の表に示します。


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド ListView.ColumnHeaderCollection ListView.ColumnHeaderCollection クラスの新しいインスタンスを初期化します。
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
( プロテクト メソッド も参照)
  名前 説明
パブリック メソッド Add オーバーロードされます。 列ヘッダーをコレクションに追加します。
パブリック メソッド AddRange 列ヘッダーの配列をコレクションに追加します。
パブリック メソッド Clear コレクションからすべての列ヘッダーを削除します。
パブリック メソッド Contains 指定した列ヘッダーがコレクション内にあるかどうかを判断します。
パブリック メソッド ContainsKey 指定したキーを持つ列がコレクション内に格納されているかどうかを確認します。
パブリック メソッド Equals  オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。)
パブリック メソッド GetEnumerator 列ヘッダーのコレクションを反復処理するために使用する列挙子を返します。
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。)
パブリック メソッド GetType  現在のインスタンスの Type を取得します。 (Object から継承されます。)
パブリック メソッド IndexOf 指定した列ヘッダーのコレクション内のインデックスを返します。
パブリック メソッド IndexOfKey 指定したキーを持つ列のインデックスを確認します。
パブリック メソッド Insert オーバーロードされます。 コレクション内の指定したインデックス位置に、列ヘッダーを挿入します。
パブリック メソッド ReferenceEquals  指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。)
パブリック メソッド Remove 指定した列ヘッダーをコレクションから削除します。
パブリック メソッド RemoveAt コレクション内の指定されたインデックスにある列ヘッダーを削除します。
パブリック メソッド RemoveByKey 指定したキーを持つ列をコレクションから削除します。
パブリック メソッド ToString  現在の Object を表す String を返します。 (Object から継承されます。)
プロテクト メソッドプロテクト メソッド
明示的インターフェイスの実装明示的インターフェイスの実装
  名前 説明
インターフェイスの明示的な実装 System.Collections.ICollection.CopyTo 特定の配列インデックスを開始位置として、配列に ListView.ColumnHeaderCollection 内の ColumnHeader オブジェクトをコピーします。
インターフェイスの明示的な実装 System.Collections.IList.Add ColumnHeader を ListView に追加します。
インターフェイスの明示的な実装 System.Collections.IList.Contains 指定した列ヘッダーがコレクション内にあるかどうかを判断します。
インターフェイスの明示的な実装 System.Collections.IList.IndexOf 指定した列ヘッダーのコレクション内のインデックスを返します。
インターフェイスの明示的な実装 System.Collections.IList.Insert コレクション内の指定したインデックス位置に、既存の列ヘッダーを挿入します。
インターフェイスの明示的な実装 System.Collections.IList.Remove 指定した列ヘッダーをコレクションから削除します。
インターフェイスの明示的な実装 System.Collections.IList.Item コレクション内の指定したインデックスにある列ヘッダーを取得または設定します。
参照参照

関連項目

ListView.ColumnHeaderCollection クラス
System.Windows.Forms 名前空間


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

英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

「ListView.ColumnHeaderCollection」の関連用語

ListView.ColumnHeaderCollectionのお隣キーワード
検索ランキング

   

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



ListView.ColumnHeaderCollectionのページの著作権

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

©2026 GRAS Group, Inc.RSS