次の方法で共有


ListView.ColumnHeaderCollection.Insert メソッド

定義

指定したインデックス位置にあるコレクションに列ヘッダーを挿入します。

オーバーロード

名前 説明
Insert(Int32, String, String, Int32, HorizontalAlignment, String)

指定したテキスト、キー、幅、およびイメージ キーが揃った新しい列ヘッダーを作成し、指定したインデックス位置にあるコレクションにヘッダーを挿入します。

Insert(Int32, String, String, Int32, HorizontalAlignment, Int32)

テキスト、キー、幅、およびイメージのインデックスを指定して新しい列ヘッダーを作成し、指定したインデックス位置にあるコレクションにヘッダーを挿入します。

Insert(Int32, String, Int32, HorizontalAlignment)

新しい列ヘッダーを作成し、指定したインデックス位置にあるコレクションに挿入します。

Insert(Int32, String, String, Int32)

指定したテキスト、キー、および幅を持つ新しい列ヘッダーを作成し、指定したインデックス位置にあるコレクションにヘッダーを挿入します。

Insert(Int32, String, String)

指定したテキストとキーを持つ新しい列ヘッダーを作成し、指定したインデックス位置にあるコレクションにヘッダーを挿入します。

Insert(Int32, String, Int32)

指定したテキストと初期幅を持つ新しい列ヘッダーを作成し、指定したインデックス位置にあるコレクションにヘッダーを挿入します。

Insert(Int32, ColumnHeader)

コレクション内の指定したインデックス位置に既存の列ヘッダーを挿入します。

Insert(Int32, String)

指定したテキストを含む新しい列ヘッダーを作成し、指定したインデックス位置にあるコレクションにヘッダーを挿入します。

Insert(Int32, String, String, Int32, HorizontalAlignment, String)

ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs

指定したテキスト、キー、幅、およびイメージ キーが揃った新しい列ヘッダーを作成し、指定したインデックス位置にあるコレクションにヘッダーを挿入します。

public:
 void Insert(int index, System::String ^ key, System::String ^ text, int width, System::Windows::Forms::HorizontalAlignment textAlign, System::String ^ imageKey);
public void Insert(int index, string key, string text, int width, System.Windows.Forms.HorizontalAlignment textAlign, string imageKey);
member this.Insert : int * string * string * int * System.Windows.Forms.HorizontalAlignment * string -> unit
Public Sub Insert (index As Integer, key As String, text As String, width As Integer, textAlign As HorizontalAlignment, imageKey As String)

パラメーター

index
Int32

列ヘッダーが挿入される 0 から始まるインデックス位置。

key
String

列ヘッダーの名前。

text
String

列ヘッダーに表示するテキスト。

width
Int32

列ヘッダーの初期幅 (ピクセル単位)。

textAlign
HorizontalAlignment

HorizontalAlignment値の 1 つ。

imageKey
String

列ヘッダーに表示するイメージのキー。

注釈

コレクション内の位置を指定せずに列ヘッダーを追加するには、 Add メソッドを使用します。 列ヘッダーの配列をコレクションに追加する場合は、 AddRange メソッドを使用します。

Name プロパティは、ListView.ColumnHeaderCollection内の列のキーに対応します。

適用対象

Insert(Int32, String, String, Int32, HorizontalAlignment, Int32)

ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs

テキスト、キー、幅、およびイメージのインデックスを指定して新しい列ヘッダーを作成し、指定したインデックス位置にあるコレクションにヘッダーを挿入します。

public:
 void Insert(int index, System::String ^ key, System::String ^ text, int width, System::Windows::Forms::HorizontalAlignment textAlign, int imageIndex);
public void Insert(int index, string key, string text, int width, System.Windows.Forms.HorizontalAlignment textAlign, int imageIndex);
member this.Insert : int * string * string * int * System.Windows.Forms.HorizontalAlignment * int -> unit
Public Sub Insert (index As Integer, key As String, text As String, width As Integer, textAlign As HorizontalAlignment, imageIndex As Integer)

パラメーター

index
Int32

列ヘッダーが挿入される 0 から始まるインデックス位置。

key
String

列ヘッダーの名前。

text
String

列ヘッダーに表示するテキスト。

width
Int32

列ヘッダーの初期幅 (ピクセル単位)。

textAlign
HorizontalAlignment

HorizontalAlignment値の 1 つ。

imageIndex
Int32

列ヘッダーに表示するイメージのインデックス。

注釈

コレクション内の位置を指定せずに列ヘッダーを追加するには、 Add メソッドを使用します。 列ヘッダーの配列をコレクションに追加する場合は、 AddRange メソッドを使用します。

Name プロパティは、ListView.ColumnHeaderCollection内の列のキーに対応します。

適用対象

Insert(Int32, String, Int32, HorizontalAlignment)

ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs

新しい列ヘッダーを作成し、指定したインデックス位置にあるコレクションに挿入します。

public:
 void Insert(int index, System::String ^ str, int width, System::Windows::Forms::HorizontalAlignment textAlign);
public:
 void Insert(int index, System::String ^ text, int width, System::Windows::Forms::HorizontalAlignment textAlign);
public void Insert(int index, string str, int width, System.Windows.Forms.HorizontalAlignment textAlign);
public void Insert(int index, string text, int width, System.Windows.Forms.HorizontalAlignment textAlign);
member this.Insert : int * string * int * System.Windows.Forms.HorizontalAlignment -> unit
member this.Insert : int * string * int * System.Windows.Forms.HorizontalAlignment -> unit
Public Sub Insert (index As Integer, str As String, width As Integer, textAlign As HorizontalAlignment)
Public Sub Insert (index As Integer, text As String, width As Integer, textAlign As HorizontalAlignment)

パラメーター

index
Int32

列ヘッダーが挿入される 0 から始まるインデックス位置。

strtext
String

列ヘッダーに表示するテキスト。

width
Int32

列ヘッダーの初期幅。 列ヘッダーを列内の最大サブ項目テキストのサイズに自動サイズ変更するには -1 に設定するか、列ヘッダーを列ヘッダーのテキストのサイズに自動サイズ変更する -2 に設定します。

textAlign
HorizontalAlignment

HorizontalAlignment値の 1 つ。

例外

indexが 0 未満であるか、ListView.ColumnHeaderCollectionCount プロパティの値以上です。

注釈

このバージョンの Insert メソッドを使用すると、特定の列ヘッダーテキスト、幅、およびテキスト配置設定を使用して新しい ColumnHeader を作成し、 ListView.ColumnHeaderCollection内の特定の位置に挿入できます。 列ヘッダーの既存のコレクションに新しい列ヘッダーを挿入する場合は、このメソッドを使用できます。 既存の ColumnHeader を使用してコレクション内の特定の位置に挿入する場合は、 Insert メソッドの他のバージョンを使用します。 コレクション内の特定の位置を指定せずに列ヘッダーを追加するには、 Add メソッドを使用します。 列ヘッダーの配列をコレクションに追加する場合は、 AddRange メソッドを使用します。

こちらもご覧ください

適用対象

Insert(Int32, String, String, Int32)

ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs

指定したテキスト、キー、および幅を持つ新しい列ヘッダーを作成し、指定したインデックス位置にあるコレクションにヘッダーを挿入します。

public:
 void Insert(int index, System::String ^ key, System::String ^ text, int width);
public void Insert(int index, string key, string text, int width);
member this.Insert : int * string * string * int -> unit
Public Sub Insert (index As Integer, key As String, text As String, width As Integer)

パラメーター

index
Int32

列ヘッダーが挿入される 0 から始まるインデックス位置。

key
String

列ヘッダーの名前。

text
String

列ヘッダーに表示するテキスト。

width
Int32

列ヘッダーの初期幅 (ピクセル単位)。

注釈

コレクション内の位置を指定せずに列ヘッダーを追加するには、 Add メソッドを使用します。 列ヘッダーの配列をコレクションに追加する場合は、 AddRange メソッドを使用します。

Name プロパティは、ListView.ColumnHeaderCollection内の列のキーに対応します。

適用対象

Insert(Int32, String, String)

ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs

指定したテキストとキーを持つ新しい列ヘッダーを作成し、指定したインデックス位置にあるコレクションにヘッダーを挿入します。

public:
 void Insert(int index, System::String ^ key, System::String ^ text);
public void Insert(int index, string key, string text);
member this.Insert : int * string * string -> unit
Public Sub Insert (index As Integer, key As String, text As String)

パラメーター

index
Int32

列ヘッダーが挿入される 0 から始まるインデックス位置。

key
String

列ヘッダーの名前。

text
String

列ヘッダーに表示するテキスト。

注釈

コレクション内の位置を指定せずに列ヘッダーを追加するには、 Add メソッドを使用します。 列ヘッダーの配列をコレクションに追加する場合は、 AddRange メソッドを使用します。

Name プロパティは、ListView.ColumnHeaderCollection内の列のキーに対応します。

適用対象

Insert(Int32, String, Int32)

ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs

指定したテキストと初期幅を持つ新しい列ヘッダーを作成し、指定したインデックス位置にあるコレクションにヘッダーを挿入します。

public:
 void Insert(int index, System::String ^ text, int width);
public void Insert(int index, string text, int width);
member this.Insert : int * string * int -> unit
Public Sub Insert (index As Integer, text As String, width As Integer)

パラメーター

index
Int32

列ヘッダーが挿入される 0 から始まるインデックス位置。

text
String

列ヘッダーに表示するテキスト。

width
Int32

列ヘッダーの初期幅 (ピクセル単位)。

注釈

コレクション内の位置を指定せずに列ヘッダーを追加するには、 Add メソッドを使用します。 列ヘッダーの配列をコレクションに追加する場合は、 AddRange メソッドを使用します。

適用対象

Insert(Int32, ColumnHeader)

ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs

コレクション内の指定したインデックス位置に既存の列ヘッダーを挿入します。

public:
 void Insert(int index, System::Windows::Forms::ColumnHeader ^ value);
public void Insert(int index, System.Windows.Forms.ColumnHeader value);
member this.Insert : int * System.Windows.Forms.ColumnHeader -> unit
Public Sub Insert (index As Integer, value As ColumnHeader)

パラメーター

index
Int32

列ヘッダーが挿入される 0 から始まるインデックス位置。

value
ColumnHeader

コレクションに挿入する ColumnHeader

例外

indexが 0 未満であるか、ListView.ColumnHeaderCollectionCount プロパティの値以上です。

注釈

このバージョンの Insert メソッドを使用すると、ListView.ColumnHeaderCollection内の特定の位置に既存のColumnHeaderを挿入できます。

新しい ColumnHeader を作成し、コレクション内の特定の位置に挿入する場合は、他のバージョンの Insert メソッドを使用します。 コレクション内の特定の位置を指定せずに列ヘッダーを追加するには、 Add メソッドを使用します。 列ヘッダーの配列をコレクションに追加する場合は、 AddRange メソッドを使用します。

こちらもご覧ください

適用対象

Insert(Int32, String)

ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs
ソース:
ListView.ColumnHeaderCollection.cs

指定したテキストを含む新しい列ヘッダーを作成し、指定したインデックス位置にあるコレクションにヘッダーを挿入します。

public:
 void Insert(int index, System::String ^ text);
public void Insert(int index, string text);
member this.Insert : int * string -> unit
Public Sub Insert (index As Integer, text As String)

パラメーター

index
Int32

列ヘッダーが挿入される 0 から始まるインデックス位置。

text
String

列ヘッダーに表示するテキスト。

例外

indexが 0 未満であるか、ListView.ColumnHeaderCollectionCount プロパティの値以上です。

注釈

コレクション内の位置を指定せずに列ヘッダーを追加するには、 Add メソッドを使用します。 列ヘッダーの配列をコレクションに追加する場合は、 AddRange メソッドを使用します。

適用対象