Control.ControlCollection クラスとは? わかりやすく解説

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

Control.ControlCollection クラス

Control オブジェクトコレクション表します

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

<ComVisibleAttribute(False)> _
Public Class ControlCollection
    Inherits ArrangedElementCollection
    Implements IList, ICollection, IEnumerable, ICloneable
Dim instance As ControlCollection
[ComVisibleAttribute(false)] 
public class ControlCollection : ArrangedElementCollection,
 IList, ICollection, IEnumerable, 
    ICloneable
[ComVisibleAttribute(false)] 
public ref class ControlCollection : public
 ArrangedElementCollection, IList, ICollection, IEnumerable, 
    ICloneable
/** @attribute ComVisibleAttribute(false) */ 
public class ControlCollection extends ArrangedElementCollection
 implements IList, ICollection, 
    IEnumerable, ICloneable
ComVisibleAttribute(false) 
public class ControlCollection extends
 ArrangedElementCollection implements IList, ICollection, 
    IEnumerable, ICloneable
解説解説
使用例使用例

Control派生クラス PanelControl.ControlCollectionメンバである場合に、そのコントロールコレクションから削除するコード例次に示します。この例では、Form 上に PanelButton、および少なくとも 1 つRadioButton コントロール作成されている必要がありますRadioButton コントロールPanel コントロール追加されPanel コントロールForm コントロール追加されます。ボタンクリックされると、radioButton2 という名前のオプション ボタンControl.ControlCollection から削除されます。

' Remove the RadioButton control if it exists.
Private Sub RemoveButton_Click(ByVal
 sender As System.Object, _
    ByVal e As System.EventArgs) Handles
 RemoveButton.Click
    If Panel1.Controls.Contains(RadioAddRangeButton) Then
        Panel1.Controls.Remove(RadioAddRangeButton)
    End If
End Sub
// Remove the RadioButton control if it exists.
private void removeButton_Click(object sender,
 System.EventArgs e)
{
   if(panel1.Controls.Contains(removeButton))
   {
      panel1.Controls.Remove(removeButton);
   }
}
   // Remove the RadioButton control if it exists.
private:
   void removeButton_Click( Object^ /*sender*/, System::EventArgs^
 /*e*/ )
   {
      if ( panel1->Controls->Contains( removeButton ) )
      {
         panel1->Controls->Remove( removeButton );
      }
   }
// Remove the RadioButton control if it exists.
private void removeButton_Click(Object sender,
 System.EventArgs e)
{
    if (panel1.get_Controls().Contains(removeButton)) {
        panel1.get_Controls().Remove(removeButton);
    }
} //removeButton_Click
継承階層継承階層
System.Object
   System.Windows.Forms.Layout.ArrangedElementCollection
    System.Windows.Forms.Control.ControlCollection
       派生クラス
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


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

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

辞書ショートカット

すべての辞書の索引

「Control.ControlCollection クラス」の関連用語

Control.ControlCollection クラスのお隣キーワード
検索ランキング

   

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



Control.ControlCollection クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS